2,040 Posted Topics

Member Avatar for star_lavender

Your question is a bit obscure. What type of value are you expecting a user to enter? What would you do if a user enter value in text 'A' and 'B', and then delete the value in text 'A' afterward? Do you want it to recompute all the time? Please …

Member Avatar for Taywin
-1
79
Member Avatar for macguyver

Your code is going to be out of bound. Array in Javascript is 0-index, not 1-index. Also, you need to read the scriptaculous tutorial about how to do it. I have never used it, but I can at least tell you that you are doing it wrong. You are not …

Member Avatar for Taywin
0
144
Member Avatar for nathmaniedeo

Well, it is not about using JavaScript or server side to display a page, but it is about what you want and how concern in security. Often time, JavaScript is used to validate form and values. If you want quick validation, JavaScript would be fine; however, you may still need …

Member Avatar for nathmaniedeo
0
134
Member Avatar for nikita.chandra

You can just use random() function to get 2 images you want to swap. Then perform the swap between those two. You already have numImages variable, so you could random it off from that in your dimages[] array. [CODE] var firstIndex = Math.floor(Math.random()*numImages) var secondIndex = Math.floor(Math.random()*numImages) // caution: the …

Member Avatar for Taywin
0
229
Member Avatar for MDGM
Member Avatar for MDGM
0
100
Member Avatar for Premsathishbe

Also make sure that the element you are trying to focus can be display (not hide or invisible) to the page. If its style display is 'none' or visibility is 'hidden', you could get the error. In addition, if the element has 'disable' property set, it cannot be focus as …

Member Avatar for Taywin
0
102
Member Avatar for kobi

If you are asking about Javascript, then add "onclick='A_JAVA_SCRIPT_FUNCTION()'" to the tag that you want it to perform a javascript script. If you are asking for "java" script, you are on the wrong forum. In this case, I assume that the HTML element you need to add 'onclick' event is …

Member Avatar for Taywin
0
144
Member Avatar for subhankar02dey

The code below demonstrates how to obtain selected value from select tags. Only desirable selected value would be listed inside 5 text boxes after a user click on the 'Finish' button. Because you said the selection can be up to 5, any of those that are not selected will not …

Member Avatar for Protuberance
0
3K
Member Avatar for chintan@dani

As Airshow said, if value of any of your variable t, hd1 and chkin does not exist, it will break your JavaScript. If you have Firefox, you should install firebug to aid you in debugging (firebug will show you where the error occurs and from what possible reason). If you …

Member Avatar for Taywin
0
215
Member Avatar for hotice47

Did you 'hard-coded' the mySQL look-up? I mean, it would be hard-coded if you specify the mySQL to look for a specific 'userName' in the data base. As a result, your mySQL will always return the same user. What you may need to do is either create a pool of …

Member Avatar for Taywin
0
244
Member Avatar for artvor

The problem is the code line below with your original script. [CODE]lis[z0].className=lis[z0]!=zxcobj?'off':'on';[/CODE] You may need to change to... [CODE]lis[z0].className=(lis[z0]!=zxcobj && lis[z0].className!="bold")?'off':'on';[/CODE] Hmm... 2nd page... Didn't see that... Sorry.

Member Avatar for Airshow
0
374
Member Avatar for parkz16

You can use Google maps API (javascript library). Though, you need to register your IP with Google before you can use it. Go to [URL="http://code.google.com/apis/maps/signup.html"]http://code.google.com/apis/maps/signup.html[/URL] if you have not sign up yet. The page also have links for you to look for how to use it.

Member Avatar for Taywin
0
63
Member Avatar for artvor

Supposedly, each of your LI tags has a unique ID (and it should otherwise you shouldn't call it ID), you can access the element directly using getElementById(ID). [CODE] //HTML part ... <li class="on" id="change1">blah</li> <li class="on" id="change2">blah</li> ... //JavaScript when call example <input type="button" value="change class 1" onclick="chgClass('change1')"> <input type="button" …

Member Avatar for Airshow
0
313
Member Avatar for dennishall

I would think that FckEditor website should have a forum or tutorial for this. I never used FckEditor but tinyMCE. Their website has a wiki and explain how to add your own button/functionality. I would expect FckEditor to have some sort of information as well because it has been existing …

Member Avatar for Taywin
0
143
Member Avatar for aladar04

No, you don't have permission to go across web page. How would you find where the other page is located at? Even if the page is on the same website, you still can't access it directly. There is a workaround but the value in the other web page must be …

Member Avatar for Taywin
0
69
Member Avatar for H_TSOPELAS

[CODE]<SCRIPT LANGUAGE="JavaScript">[/CODE] This is not supposed to be only 'javascript'. It should be...<SCRIPT LANGUAGE="text/JavaScript"> [CODE] yr = (yea.value) ; m = (mon.value) ; d = (day.value) ; [/CODE] Where are yea, mon, and day variable? You have not declared them earlier, so they are unknown to browser. [CODE] if ((navigator.appName …

Member Avatar for Airshow
0
166
Member Avatar for ktyler

[CODE]<INPUT name=newdistshare> <INPUT type=checkbox Name="newdistdefault">[/CODE] Not sure but your attribute 'Name' should be 'name'. That's the only thing I am seeing from a quick look here...

Member Avatar for Taywin
0
137
Member Avatar for arctushar

1. As Troy III said, you are not supposed to have 'script' tag inside a .js file. If you have it, remove it. 2. Where is the .js file? Is it in where it is supposed to be -- js folder? Assuming your HTML file is in folder 'myHTML', your …

Member Avatar for Taywin
0
130
Member Avatar for CasTex

Why do you need php in order to display the value of the variable? You could simply use it. [CODE] <script type="text/javascript"> function test(aVariable){ document.getElementById("php_code").innerHTML=aVariable // you could use aVariable.toString() if you want to but may not get different result } </script> [/CODE]

Member Avatar for Taywin
0
111
Member Avatar for serkan sendur

[QUOTE]hi, im new here, and i cannot find the topic for Writing a program to find the power of any given number that is basic enough,im a beginner, if anyone can help me or just giving me a link to an existing thread like this..i will appreciate it very much... …

Member Avatar for Taywin
-1
96
Member Avatar for lse123

I'm not sure if this really work. Is an email supposed to start with a dot? Also, there are other format which is a valid email would not pass this regexp... 1) .@abc.com --> shouldn't it suppose to fail? (obviously, no email name contains only '.') 2) [email]abc@-.com[/email] --> shouldn't …

Member Avatar for Taywin
0
156
Member Avatar for jigarsolanki

I don't know how to answer your question? It has no detail at all. Define "navigation menu"? Define what "menu" should be like? What it is used for? How do you want to cooperate JavaScript with it? Etc... Please do not expect people on the forum to understand what you …

Member Avatar for Taywin
0
30
Member Avatar for arctushar

You need to read about Ajax. Though, Google have their own way of indexing the search list, so don't expect that your page will be the same speed as Google.

Member Avatar for Taywin
0
52
Member Avatar for Olliepop

Your validation in your code is somewhat odd. 1.It is not a good idea to keep redeclaring new whole arrays just to clear only 1 event you set out using setTimeout(). 2.Why would you check for dat.innerHTML==null if the 'dat' could be null itself before you can check for innerHTML …

Member Avatar for Taywin
0
87
Member Avatar for dani0

Your question is very vague. Even though I do not really want to help you but it turned out to be quite an unexpected good exercise. A sample code is below... [CODE] <html> <head> <script type="text/javascript"> function displaySomething(aID, formID) { var el = document.getElementById(aID) if (el) { el.style.display = null …

Member Avatar for Thirusha
0
138
Member Avatar for imbest

[CODE]e.style.top= document.getElementById(txtid).parentElement.offsetTop+35;[/CODE] There is no such 'parentElement' in FF. You should use 'parentNode' for FF. Not sure if IE also accepts that; otherwise, you need to check for client browser before you attempt to do so.

Member Avatar for dannie_cake
0
148
Member Avatar for techie929

Are you sure that the error is actually occurred in this line? Could it possibly be from previous lines (incorrect parentheses matching)?

Member Avatar for Taywin
0
177
Member Avatar for Roebuc
Member Avatar for chillipit
Member Avatar for pietpiraat

I think it depends on how you add table rows. I am not sure why you need 'input' tag inside the form for? You are preparing to add new table row with each submission of values in input tags? Anyway, a sample code dynamically add table row with adding sum …

Member Avatar for pietpiraat
0
1K
Member Avatar for greatunknown

You mean a user highlights a portion of text and you use JS to copy the text portion? IE, FF, and Chrome read value of range selection differently. If I remember correctly, IE uses document.selection, FF uses window.getSelection(), and Chrome uses window.getSelection() but with value of setBaseAndExtent. Search for those …

Member Avatar for greatunknown
0
79
Member Avatar for himmat.m4

Why not use the Servlet to generate javascript code as well? If you don't want to do that, then use Servlet to generate HTML page and put the value in an HTML element value (if you define an ID to the element, it would be easier for javascript to find …

Member Avatar for Taywin
0
75
Member Avatar for nikita.chandra

It is difficult to try to help you without seeing any code or image of the page. Anyway, I will try. The way to remove the seat number from text box should be similar to how you add the seat number to the text box. The only different is that …

Member Avatar for Taywin
0
1K
Member Avatar for nikita.chandra

[QUOTE]1. You neglected to end each line with a ;[/QUOTE] You don't need to end it with ';' anymore unless you are trying to code it in 1 line. :)

Member Avatar for Airshow
0
107
Member Avatar for mg4

A sample code is below. [CODE] <html> <head> <script type="text/javascript"> var opt1 = ["usCity1","usCity2","usCity3"] var opt2 = ["mxCity1","mxCity2","mxCity3","mxCity4"] var opt3 = ["cnCity1","cnCity2","cnCity3","cnCity4","cnCity5"] function displayCity(selID, subSelID) { var dispElem = document.getElementById(subSelID) if (dispElem) { // ensure that display element exists var selElem = document.getElementById(selID) if (selElem) { // ensure that source …

Member Avatar for Taywin
0
103
Member Avatar for nikita.chandra

This [URL="http://stackoverflow.com/questions/760422/how-can-i-close-a-window-with-javascript-on-mozilla-firefox-3"]link[/URL] should answer and solve your question if you are talking about firefox.

Member Avatar for Taywin
0
101
Member Avatar for maxelcat

Maybe you should look into 2 things - SQL injection and Cross Site Scripting (XSS). These 2 are common in attacking website database/content. Then you should have more understanding about prevention. By the way, do not use ONLY JavaScript to validate user input. The JavaScript is for convenient but not …

Member Avatar for vhss
0
135
Member Avatar for heshanm

Sorry, can't suggest you anything without sample code. The problem with your explanation is that I do not know how you deal with icon and how you put your icon in the page.

Member Avatar for vhss
0
73
Member Avatar for KcNaveen

Yes, but you need to use 'onSubmit' in the form tag to change the radio button to be disabled. A sample code is below... [CODE] <html> <head> <script type="text/javascript"> function demo(form) { var rads = form.radd for (var i=0; i<rads.length; i++) { rads[i].disabled = true } return true } </script> …

Member Avatar for KcNaveen
0
100
Member Avatar for weles

Why would you add the 'id' property to 'option' tag? Would it be OK to use the value as '$partner_id' instead of '$contact_name'? If you want contact_name, you could use select.options[select.selectedIndex].innerHTML to get the contact_name instead. It is redundant... What if you remove the 'id' property and use 'value' property …

Member Avatar for weles
0
84
Member Avatar for george61

Not sure you would get only 1 'body' from your tag (may get an array with 1 element). Shouldn't you use document.getElementsByTagName("BODY")[0].style.backgroundImage = img ??? Also, not sure if the image would be shown if it is not loaded yet. You may need CSS for it.

Member Avatar for Airshow
0
455
Member Avatar for SKbirdie

If the 'custno' is a JavaScript variable, you could use it without quotation marks around it (<a href="WI_testweb/"+custno+".xls">). I am not sure whether or not speedscript is JavaScript???

Member Avatar for SKbirdie
0
212
Member Avatar for monstercameron
Member Avatar for monstercameron
0
107
Member Avatar for sharonig

Could you please post the code portion? By explanation is not really enough to pin point the issue.

Member Avatar for Taywin
0
78
Member Avatar for kumar selva

And what is IT COMPANY you are talking about??? And how much knowledge you know about JavaScript? You should read about what is and how JavaScript works, so you would get an idea what it is.

Member Avatar for Taywin
-1
48
Member Avatar for mymattu

The problem is on line 5, you end it with a slash '/' instead of a comma ','. Because your code has improper line break, your code is invalid. If you are not sure about line breaker or copy codes from others, you should try to merge all multiple-line code …

Member Avatar for Taywin
0
93
Member Avatar for bjeffries

The link is broken. Also, sorry... I am not familiar with JQuery because I don't use it.

Member Avatar for Taywin
0
92
Member Avatar for pietpiraat

[CODE]parseInt (startHSelect.value)[/CODE] This is dangerous and may not give you the right value in your case (string number has leading '0'). Instead, all of your parseInt should be... [CODE]parseInt (startHSelect.value, 10)[/CODE]

Member Avatar for Airshow
0
2K
Member Avatar for oscar_10002

Are you sure this is how the code should be? I corrected those misplaced double quotes, but I am still not sure; especially the last part of the code... What are 'dirty' properties? [CODE] <div class="Block FeaturedProducts Moveable Panel" id="HomeFeaturedProducts" style="display:%%GLOBAL_HideHomeFeaturedProductsPanel%%"> <h2 dirty="false">%%SNIPPET_HomeFeaturedProductsFeed%%%%LNG_FeaturedProducts%%</h2 dirty="false"> <div class="BlockContent"> <script language="javascript"> // SPECIFY …

Member Avatar for Graphix
0
138
Member Avatar for jhonilson

The problem is that you can't directly access attribute 'name' using '.name' in FF (not sure in IE). You need to use function getAttribute(attributeName, flag) instead. The 'flag' value can be left out. [CODE] if(x.elements[i].id=="check") { jhon[i]=x.elements[i].getAttribute("name"); } else if(x.elements[i].id=="text"){ jhon1[i]=x.elements[i].getAttribute("name"); } [/CODE] Hope this help.

Member Avatar for jhonilson
0
97

The End.