Semi-Colon
Jul 20, 2005I am never sure of when a semi-colon is required in javascript. Is
there a definite rule? Code:
I am never sure of when a semi-colon is required in javascript. Is
there a definite rule? Code:
How do you escape a colon in JavaScript? I've tried several fixes (backslashes, hexadecimal code) and no luck.
View 4 Replies View RelatedCan I print the contents of the td tags and split them on the semi colon?
<tr>......<td title='text;text;text'>text</td></tr>
What I want to do is display each piece of text in the same cell rotating, including the text outside the title tag. What I'm thinking is to count each piece of text from inside the title tag into an array, cycle through them then display the outer text from the td tags so the four are displayed on each cycle.
I had a requirement in javascript.If I enter time as 12 it should automatically insert colon after hours and shoud allow user to enter minutes. First enter hours 12 while we are ready to insert minutes it should automatically insert colon as well as minutes.
function autoTabTimes(input, len) {
if (input.value.length == 2) {
if (input.value.indexOf(":") == -1) {
input.value = input.value + ":";
} var str = input.value.split(":");
if (str[0].length == 1) {
input.value = "0" + str[0];
}}
if (input.value.length >= len) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input) + 1)].focus();
} return true;
}
The above code is working but it is not allowing user to edit the time back space is not working.
We have a dynamically created javascript menu (from ASP), which is
customised per user (Have already taken all the static code out into
separate cached .js file)
The size of the 'dynamic' menu content can be as much as 10kB, and the
menu typically does not change for the duration of the user's session
- i.e. it would be nice to get the browser to 'cache' this. It is an
Intranet application, and is typically aimed at IE6 clients only.
Have considered the following strategies
1) Cookies - although the last thing I want is the whole menu coming
back to the server on every HTTP request - but would be useful IF
there is e.g. a header option the cookie to 'send' the cookie (Server
-> Browser) without the browser ever sending it back to the server
(but the browser still being able to 'read' the cookie?)
2) Creating 'dynamic' javascript files - i.e. send the output per user
to a mangled .js file (e.g. with a session ID in the filename), into a
cached js file. Would however need to cleanup the files quite
regularly, and giving IUSR file creation access doesn't seem a good
idea. Would then get the browser to include the JS by generating ASP
along the lines of.
<script language="JavaScript"
src="TempScripts/Menu<%=UserSession%>.js"></script>
Is there any other way?
Second Question : Is there any way to get IE to stop sending up the
HTTP REFERER header up to the server (e.g. RegKey) - this is pretty
pointless on an Intranet App (I know there is a way to do in
NetScape).
Can anyone tell how to make semi-advanced web browser?
View 1 Replies View RelatedI am having difficulties with my code and i've tried many ways to do everything from do while to if else statements. i've got everything in my code down but that pesky loop statement, and i'm trying to write my code where it says if one of either of variable Orbital Period or Semi-Major Axis is a zero, then it should use different way to read the inputed information.
View 3 Replies View Relatedi have been tasked to create a web page that includes a fading background. (It must become semi transparent once the page has loaded,and remain until a new page is selected. I want to use a similar concept to: [URL]. However instead of fading out to black, i need it to fade out to white (between 10-15% image opacity). I would also need a similar central, transparent, scrollable frame/div (where each page will load up within and like the above link,i need a different background image to each page.
View 1 Replies View RelatedFor a college assignment, i have been tasked to create a web page that includes a fading background. (It must become semi transparent once the page has loaded,and remain until a new page is selected. I want to use a similar concept [URL]. However instead of fading out to black, i need it to fade out to white (between 10-15% image opacity).
I would also need a similar central, transparent, scrollable frame/div (where each page will load up within and like the above link,i need a different background image to each page.
I've been looking all over the place in order to find a script like they use on Foliostars, where you see a sliding semi-transparant text layer over a thumbnail image when you hover. how to achieve this using JS or an Ajax framework (preferably JQuery)?
View 2 Replies View Related