2,040 Posted Topics

Member Avatar for xterradaniel

The idea is to have a ctrl flag in your class. When a key press is a ctrl button, change the flag to true. When the key up is ctrl, change it back to false. Therefore, you could now check whether or not the ctrl is being held. In your …

Member Avatar for Taywin
0
161
Member Avatar for divyakrishnan

You are not allowed to close a tab in firefox. It is their policy to not allow it because user should have control over a page at all time. However, a pop up which is opened by javascript may be closed by its parent window using javascript...

Member Avatar for Taywin
0
91
Member Avatar for nwright

If you want to stop form from submitting, you may use 'onsubmit = "return aFunction()"' in form tag to do it. If the returned value is true, the form will be submitted; otherwise, it will stay on the page and wait for another submission. One problem here, if you have …

Member Avatar for Taywin
0
199
Member Avatar for QWaz

Qwaz: The way you implement javascript argument is ambiguous. You must not have the same argument name, or the script will not know which argument you are calling. In this case, you have 2 of [b]id[/b] arguments in your function definition. Do the div 'thetext' and 'thetext1' have their own …

Member Avatar for Airshow
0
263
Member Avatar for Roy Murphy

And what's wrong with your code on IE9? You need to be more clear about this. Your code is very long and I do not have time to look at your whole code to figure out what the issue is...

Member Avatar for Roy Murphy
0
149
Member Avatar for BigFormat

[QUOTE]Changing "CANCEL" button type to 'button' instead of 'submit' will cause the page not to refresh when I click "CANCEL". I need the page to refresh, in order to pass some $_POST values... [/QUOTE] What Luckychap means could be that you change the type of "CANCEL" to button and add …

Member Avatar for BigFormat
0
186
Member Avatar for ryoonnet

If you are using IE (and IE only), you may be able to access local storage to do what you want with JavaScript; otherwise, you cannot due to security... What would you want to do with the file using python?

Member Avatar for Airshow
0
276
Member Avatar for jbhorne

Can't get to the website... Only shows "No specified file" for me. I'm using FF as well. Anyway, I tried it locally, it works if you change... [CODE] if (num==0){var posy=0} if (num==1){var posy=-88} if (num==2){var posy=176} [/CODE] to [CODE] var posy if (num==0){posy=0} if (num==1){posy=-88} if (num==2){posy=176} [/CODE] The …

Member Avatar for jbhorne
0
175
Member Avatar for kchadek

How about using String class methods to do this for you instead of convert words to array? You could use substring(int beginIndex, int endIndex) to get a character for a word as string, and then use indexOf(String str, int fromIndex) to search for the selected substring inside another string. If …

Member Avatar for Taywin
0
213
Member Avatar for LianaN

You need to look at what toString() of Object return. Also, you should use equals() for object comparison instead of attempt to compare using reference comparison symbol. You may need to read more about equals() in Java because it is not an easy topic. Furthermore, there are restriction and problem …

Member Avatar for Taywin
0
106
Member Avatar for jliao20
Member Avatar for sharonig
Member Avatar for iraqi4life

It means if the value of the variable you are using in comparison is 1, 3, 5, 7, 8, 10, or 12, it would make these case statements true. As a result, the 'day' variable is assigned to 31. If you are assigning a value to a variable, you assign …

Member Avatar for Eric Cute
0
136
Member Avatar for shadiadiph

You can do it either in div or textarea; however, the approach is a bit different. You need a highlight for div because there is no cursor location in div display (only highlight). In textarea, you can get the current cursor or highlight area. I did it for the company …

Member Avatar for lambing
0
682
Member Avatar for djcrab

If all you want is to display a text while mouse is over, you don't need onmouseover event. What you may want to do is title. [CODE] <a href="manatee.html" title="Click here to visit the manatee.">Manatee</a><br /> <a href="panda.html" title="Click here to visit the panda.">Panda</a><br /> <a href="polarbear.html" title="Click here to …

Member Avatar for Troy III
0
117
Member Avatar for hatux

Do you mean the integer from SearchWord, Search2Words, etc.? How do you associate these 2 classes together? You may need to acquire the values from your first class (ObtainKey) and then pass them to the second class (Search). Your class definition looks weird by the way...

Member Avatar for hatux
0
216
Member Avatar for nlanka

Next time, please use the CODE tag instead of upload the file. Also, you should post only the method you are having a problem with... Anyway in main method, you are implementing 2 sets of if-else statements. One is before the while loop and the other is inside the while …

Member Avatar for Taywin
0
83
Member Avatar for something78

Old thread... Anyway, you may read [URL="http://www.activxperts.com/activcomport/howto/html/"]this[/URL] for possibility (require IE though).

Member Avatar for Taywin
0
128
Member Avatar for honeybunch16

[QUOTE]exam 30% project 30% quiz 20% assign 10% notebook 10% grade 10% [/QUOTE] This part causes the confusion for the whole explanation... They don't add up to 100%; besides, where should quiz go into? How many points in it?

Member Avatar for javaAddict
-1
175
Member Avatar for filch

You should check what value is actually returned from 'item_name.val()'. Alert it to see what actually is returned? (add alert(value) right after line 3 in your javascript code.) The reason is that it looks like your if-else statement is always false; as a result, it returns only else.

Member Avatar for hielo
0
114
Member Avatar for aro_kai

Well, you may try to read [URL="http://www.permadi.com/tutorial/javaGetImagePixels/index.html"]this[/URL] for some more ideas.

Member Avatar for Taywin
0
78
Member Avatar for koduruabhinav

You are asking questions that are assignment to you. I am not supposed to answer this for you, but I will give you a couple links for you to look at. Please do not be lazy next time and search on the Internet or read from text books... Read [URL="http://www.janeg.ca/scjp/oper/string.html"]this[/URL] …

Member Avatar for Taywin
0
103
Member Avatar for MartinRinehart

What do you mean by documented? You mean something like [URL="http://getfirebug.com/wiki/index.php/Main_Page"]this[/URL] for Firebug? And for Dragonfly is [URL="http://www.opera.com/dragonfly/documentation/"]this[/URL]???

Member Avatar for Taywin
0
92
Member Avatar for george61

You can achieve that by adding a listener to the keyboard (attachEvent() for IE and addEventListener() for FF and some others); however, as Luckychap suggested, I don't think it is a good idea to do so. This is the design problem, and it should not be designed the way it …

Member Avatar for Taywin
0
232
Member Avatar for herosuke
Member Avatar for hunter8

Wait for the web master to fix the javascript error. You can't do anything right now.

Member Avatar for Taywin
0
90
Member Avatar for thejoej

Hmm... your script just uses external URL for the link. It does not try to open a new window for the link. Could you try the code below instead? (not verify it myself... just off the top of my head...) [CODE] document.write("<a href=\"javascript:window.open('"+sURL+"')\">Search Link</a>") [/CODE]

Member Avatar for thejoej
0
206
Member Avatar for stevemail

This should not be in JavaScript forum... Also, JavaScript cannot send/manage e-mail for you. What you want would deal with server while JavaScript should be dealing with local computer only (except Ajax but still on the same domain).

Member Avatar for Taywin
0
56
Member Avatar for vimax

document.all[id].style is invalid in FF. There is no document.all in FF. Use document.getElementById(id) instead.

Member Avatar for Taywin
0
231
Member Avatar for djcrab

You need to modify your string composition a little bit as below. [CODE] for (var count = 0; count < 20; ++count) { document.write(favSongs[count] + " (" + songYear[count] + ")<br />"); } [/CODE]

Member Avatar for Taywin
0
155
Member Avatar for gchurch
Member Avatar for fornandakishore
0
319
Member Avatar for mushget

Yes and no. Yes if you use select tag and either a form (with server) or a function (javascript). There are many way to implement this. Not suggested (no) if you want to use textarea. Even though you could associate textarea tag with select options, it is not proper. There …

Member Avatar for Taywin
0
90
Member Avatar for MartinRinehart

Not sure if it is a bug. I would say it is the way IE caches web content and it is different from other standard browsers. Therefore, you may not expect the same behavior on IE if you have been familiar with other browsers already.

Member Avatar for Taywin
0
276
Member Avatar for shadiadiph

You need to look into range selection; however, IE & FF & Chrome are not the same. For FF & Chrome, search the Internet for window.getSelection(). For IE, search for document.selection.createRange().

Member Avatar for shadiadiph
0
107
Member Avatar for genki01

You are not supposed to access other domain because of security issue. This is just prevent you from hacking/attacking other site on purpose (doesn't mean it is a guarantee but for most of it).

Member Avatar for genki01
0
555
Member Avatar for idlackage

One add on, dynamically set visibility may not work on IE browser unless they have fixed the bug...

Member Avatar for Taywin
0
115
Member Avatar for kedar9

Could you use 'screen.width' and 'screen.height'? [CODE] // try this to see if the screen resolution is displayed correctly <script type="text/javascript"> alert("Screen width: "+screen.width+"px\nScreen height: "+screen.height) </script> [/CODE]

Member Avatar for Taywin
0
220
Member Avatar for aadithps

I doubt you can do it in JavaScript. The reason is that you are not permitted to access local storage via a web browser; however, IE could do that using ActiveX. Then, I highly doubt that any browser allows you to copy a file in local storage to another file …

Member Avatar for Taywin
0
57
Member Avatar for puk

The code below just to show you how to do it (approximate time). I do not want to complicate the code, so it should be working in most cases. [CODE] <html> <head> <script type="text/javascript"> function redirectTo(url, timerID) { var el=document.getElementById(timerID) if (el) { // element exist el.innerHTML = 5 // …

Member Avatar for Taywin
0
84
Member Avatar for FatherLen
Member Avatar for Taywin
0
402
Member Avatar for djcrab

#1, the answer is 'true' because JavaScript evaluates an integer string and an integer as equal in this case (17=="17") #2, the answer is 0 because the last assignment of y is 25 % 5 (25 mod 5). #3, should be for-loop as the answer because you knows the length …

Member Avatar for Taywin
0
102
Member Avatar for reaphux

Where is the image area in your HTML code? Anyway, you may need to load both images but hide them while the page is being loaded (window.onload). Then you display a proper image when a proper value for date of birth is selected. There is a problem in your code …

Member Avatar for reaphux
0
106
Member Avatar for jecris

You need to show us some afford from your side first (some implemented code). I could do it but I feel that this is your assignment from school, so I should not spoil your learning.

Member Avatar for jecris
0
384
Member Avatar for luckybutlost

[CODE] window.einterval = setInterval("cst()", 5000); [/CODE] Is this also the cause of your editing (the window.einterval)???

Member Avatar for Taywin
0
110
Member Avatar for doctorphp

What is offclick??? Do you mean if the text box was focused but a user does not fill value in it, a default value will be display when the user moves the focus to another element? Is it something like the sample code below? [CODE] <html> <head> function displayDefaultValue(inputElement) { …

Member Avatar for Taywin
0
129
Member Avatar for chineerat

Your code has problems in 2 places - default value for GateRequest0 in JScript and in HTML. In JScript part, at line #6, you try to get the current value which could be changed to 0 by the time you read it again. As a result, the value will never …

Member Avatar for Taywin
0
111
Member Avatar for seekinghelp

It is the website's fault. Its JavaScript is broken (at least using IE browser to watch). You need to contact the web master. If you want a temporary fix, you may need to load your own javascript to fix that part, but I don't recommend.

Member Avatar for Airshow
0
107
Member Avatar for Matthew N.

Which one are you talking about, redirect or set display time? To redirect, you may use window.location="<your_url_goes_here>"... If you want to sleep/wait before you invoke another function, you can use setTimeout("functionName(arg1, arg2, ...)", timeInMilliseconds) to do the delay where functionName(arg1, ...) is the function to be called after timeInMilliseconds has …

Member Avatar for Taywin
0
115
Member Avatar for GigsD4X

I don't know... The way you access DOM is not intuitive. I am not sure that you would be getting what you want using for (item in content). Do you really know what [COLOR="Green"]item[/COLOR] is? I used Firebug, it gave me all including function pointers. If you want only 'input' …

Member Avatar for Taywin
0
147
Member Avatar for ClaireShutt

[CODE] var tempstr="-26.18101|-26.161011|"; // create an array within an array // [["-26.18101", "-26.161011", ""]] // as a result, -26.18101, -26.161011, undefined, undefined var latstr=new Array(tempstr.split("|")); // create an array // ["-26.18101", "-26.161011", ""] // as a result, -26.18101, -26.161011, undefined var latstr2=tempstr.split("|"); [/CODE]

Member Avatar for Taywin
0
103

The End.