|
You are a C++ expert, and that alone qualifies you as a genius! web development is a piece of cake once you get a hang of that stupid html and js
Take it one step at a time; within the desired <td> , insert a table with one column and as many rows as you need (or vise versa), set the table's width to 100%. Make sure the container <td> (or its corresponding table) has 0 cellspace and 0 cellpadding to create a smoother effect.
Now, think about how you want to display the smooth gradient... think hex digits! The RGB is directly translated to the # sign followed by R then G then B from decimal to hex (e.g. RGB = 0, 51, 153 translates to HEX = #003399 for a dark blue) creating one hex value to identify a qnique colour. Now that you know how this works, think how you were to build series (array) of strings that 1) represent hex color codes, and 2) are in correct order for an extra smooth effect!
Build your array in a for loop, adding incremented RGB values translated to hex, then pushed into a specific position within your array.
So far you have your inner table, and your array of hex colours ready to go, all you have to do is to throw your table into yet another for loop and assign the value of each element in your array as the corresponding <td> 's color attribute (e.g. td1.style.backgroundColor = a[i]).
This is a small and quick step to becoming more familiar with dhtml. Once you get a hang of it, see what else you can do with that sucker
Nila
|
|
|
|
|
C++ was back in 1999 haven't really used it much since then. Those were the days but it was *all* WIN32.
|
|
|
|
|
ahh blah! C++ will always be the king of nerdy programming even if it was *done* in 1999 I did some of that back in 2001, in fact that was the first programming language I learned to write (oops, now you know Im just a kido!! )
Nila
|
|
|
|
|
Grapes-R-Fun wrote: Build your array in a for loop, adding incremented RGB values translated to hex, then pushed into a specific position within your array.
Right. So insert the colors into a string array with FFFFFF at the top (or read first) the transitions from FFFFFF to DDDDDD at the end or read last.
No problem there.
Grapes-R-Fun wrote: So far you have your inner table, and your array of hex colours ready to go, all you have to do is to throw your table into yet another for loop and assign the value of each element in your array as the corresponding <td>'s color attribute (e.g. td1.style.backgroundColor = a[i]).
Here's where it's tricky. What you describe if I'm following you is that each transition will take one index of the array which would most likely be 5 td's or transitions total on average.
This means that it's not going to be all that smooth. There will be 5 transitions:
Index[0]#FFFFFF <td></td>
Index[1]#F7F7F7 <td></td>
Index[2]#EEEEEE <td></td>
Index[3]#E6E6E6 <td></td>
Index[4]#DDDDDD <td></td>
With this approach I'm going to need about 15 <td>'s for each table in order to have a smooth transition.
Either I'm not following you well or this approach isn't going to be feasible due to the low number of <td>'s present in each <table>.
Right?
|
|
|
|
|
Hmm... you are right my friend! We will have to figure out a way to apply the hex array elements to 15 "thinner" lines so to make it smooth. Let me dig through some of my stuff and see if I can find something good, something bendable - stay tuned!
Nila
|
|
|
|
|
Hi, I am trying to get the absolute path from FileUpload control in Asp.net lang C#. The reason I am unable to get the absolute path is because I declared FileUpload in a Ajax/Atlas Modal popup.
Can somebody help me to get the path from FileUpload without page being PostedBack.
Thanks
|
|
|
|
|
In your modal popup store the absolute path in a session variable (Session["yourVariable"] = @"C:\blahblah\abc.txt"; ) then retrieve it from where ever.
Nila
|
|
|
|
|
this is the code i used to add a flash in my aspx webpage
<object id="kenny" style="Z-INDEX: 102; LEFT: 296px; WIDTH: 368px; POSITION: absolute; TOP: 144px; HEIGHT: 240px" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"
height="240" width="368" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" viewastext="">
<param name="_cx" value="9737" />
<param name="_cy" value="6350" />
<param name="FlashVars" value="" />
<param name="Movie" value="http://localhost/JamaicaLive/FlashVideos/BobMarley-Jammin.swf" />
<param name="Src" value="http://localhost/JamaicaLive/FlashVideos/BobMarley-Jammin.swf" />
<param name="WMode" value="Window" />
<param name="Play" value="-1" />
<param name="Loop" value="-1" />
<param name="Quality" value="High" />
<param name="SAlign" value="" />
<param name="Menu" value="0" />
<param name="Base" value="" />
<param name="AllowScriptAccess" value="" />
<param name="Scale" value="ShowAll" />
<param name="DeviceFont" value="0" />
<param name="EmbedMovie" value="0" />
<param name="BGColor" value="000000" />
<param name="SWRemote" value="" />
<param name="MovieData" value="" />
<param name="SeamlessTabbing" value="1" />
<param name="Profile" value="0" />
<param name="ProfileAddress" value="" />
<param name="ProfilePort" value="0" />
<param name="AllowNetworking" value="all" />
<param name="AllowFullScreen" value="true" />
<embed src="Menu.swf" menu="false" quality="high" bgcolor="#337CF7" width="800" height="48"
type="application/x-shockwave-flash" wmode="transparent" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" />
i wan to know how can i dynamically set the src parameter is this possible?
|
|
|
|
|
I think you can have the EMBED (or whatever else) tag runat server and give it an ID (e.g. flashEmbed), then in the aspx code-behind class' Page_Load event write something like this:
If(!Page.IsPostBack){
flashEmbed.Attributes.Add("src", "Menu.swf");
}
Im no flash guru, but this is a quick way of registering client-side events/attributes.
Nila
|
|
|
|
|
when i typed in runat=server into the tag and gave flash a name. i still couldn't access it in the .vb form. i even typed me.(and u know seh this normally list everything on your page) the flash id wasn't there and even when i typed it in the program would not compile because it said that that name does not exist
|
|
|
|
|
Have you added your project a reference to FlashAccessibility COM? I know that the XHTML Transitional 1.0 standards does not support the 'embed' tag... let me see what else I can find that could help you.
Nila
|
|
|
|
|
|
I tried my original approach, and I had no problems retrieving the embed tag from my code view... maybe you should ignore the intellisense, and view that page in the web browser, see if it works. This is my little code by the way:
In design View:
<embed id="myEmbed" height="400" width="300"
pluginspage="http://www.adobe.com/svg/viewer/install/"
runat="server" />
In Code behind:
string filename = @"somefilename.swf"; //or whatever else
this.myEmbed.Attributes.Add("src", filename);
Nila
|
|
|
|
|
i trying to expand my knowledge i trying to simulate what some websites do that allow member to upload files.
thus i developed a website that i am testing locally on my machine and i wanted to be able to go to a page and click browse find a file and upload that file into my webserver.
i planning to have a test folder located at http://localhost/try/uploadfiles that i am going to upload all the files to. i hope i not sounding confused
thus the scenario is i can choose to browse and upload the following file from my machine (c:\video.swf) and then its going to be uploaded to http://10.0.0.1/try/uploadfiles
kenny
|
|
|
|
|
Hello again
The problem is that i have a web site with the following forms.. Admin,Student,Parent,Teacher... i set the authentication so no one can access this site unless he has a username and a passwd, my question is when a student enters the site.. he will have access to all the pages through the URL, so how can i set it only to his PAGE?
Thanks in advance
regards
Estarta
|
|
|
|
|
Hi,
I've done such a program but in PHP
In fact you have to check on each page if the user have enough privilege to load this page.
You should implement a little function in the page_load for exemple :
if check_rights(userid) > 200 then<br />
' have admin access for exemple<br />
...
and
function check_rights(byval userid as integer) as integer<br />
' do a select on a database to load the userlevel of the user<br />
return userlevel<br />
end function
Hope it can help you !
|
|
|
|
|
|
Hi All
I am fairly new to the asp.net 2.0 world and have been following a number of demos. I did one that showed rollovers and stuff on buttons. Now even in a brand new project, I get weird buttons that adopt this style and go the whole width of the page. Can someone tell me how to restore the normal button please?
|
|
|
|
|
John, can you post your html and code-behind?
Nila
|
|
|
|
|
Hi Nila
I can't because, the solution I found was to just delete the project (see link below) and all my buttons came back - very strange that this project changed all my buttons?
If anyone can figure it out, I'd still like to know what was going on
many thanks, John
I was running through a load of tutorials found at http://msdn.microsoft.com/vstudio/express/visualCSharp/learning
and the project was:
http://download.microsoft.com/download/4/1/e/41e8f2c1-1bf7-419f-b31b-06122d090a49/ButtonCustomizeCS.msi[
|
|
|
|
|
Happy new year, btw!
Im glad to hear everything worked out, but still puzzled as to WHY that tutorial project had such effect. Did you use it as a template for your other projects? Maybe it's because you are using VS express (are you?). The free-bee products typically contain bugs as such.
Now you got my curiousity going... let me download that tutorial and see if it does that to me too (although I got the full liscensed VS).
Later,
Nila
|
|
|
|
|
Nila
I got an email, but can't see your post. As I'm online, I thought I'd respond straight away.
I have the full version of VS2005 and I don't believe I set this project as a template - although I might have done unwittingly. I actually don't know how I would do that yet! (I'm very experience at VC++ in version 6 only and am crash-coursing in ASP.NET & C#!!)
I just loaded the project, watched the video and moved on.
thanks again
|
|
|
|
|
I am creating one class file and which is having lots of properties. Upto here i am good.
But i need for few properites there can be set of values which my other IT group can use. They will use my dll in their UI layer.
So i want something like e.g for property A there can possible values X,y and Z only.....
If possible please share some sample of code in vb.net...
Thanks and Happy new year...
Amit
|
|
|
|
|
Amit Kumar G wrote: So i want something like e.g for property A there can possible values X,y and Z only.....
The common way of doing this is for the property setter to validate the value being passed to it and throw an exception if it is invalid. Natuarlly you would document what values are valid so that the developer using your class won't use them - but mistakes happen and in the exceptional case where an invalid value gets through the property setter throws an exception.
Depending on the scenario enumerators may be a good choice instead.
|
|
|
|
|
Thanks, can you share some sample code. I need very similar like if you do
mail.priority=(High,low,normal)...
Please consider this urgent.....Thanks in advance for all your inputs..
Amit
|
|
|
|