Search Results

Search found 7 results on 1 pages for 'javascirpt'.

Page 1/1 | 1 

  • Get clientid in user control from external javascript file

    - by Giorgi
    Hello, I am developing a user control (ascx) in ASP.NET which uses javascript for manipulating controls. Currently the javascript code is inlined and uses <%= somecontrol.ClientID %> to get the control it needs. I want to put the javascript file in external file but from external file I cannot use the above syntax for retrieving controls. I have read about possible solutions in this and this answers but the problem is that the user control can be placed multiple times on page. This means that the Controls array (mentioned in the answers) will be rendered several times with different items. As a result the script will not be able to retrieve the id it needs. If I put <%= ClientId %> in the name of array that holds items then I will have the same problem as I am trying to solve. Any ideas?

    Read the article

  • switching default keyevents actions after key combinations

    - by liysd
    I need to change default actions of two events. When I press "enter" one action occurs, when I press "shift-enter" another. I need to switch it. I means if I press "enter" than "shift-enter" action occurs. I tried something like this but if doesn't work. f(evt.keyCode == 13) { if(!evt.shiftKey){ evt.preventDefault(); evt.shiftKey = true; var e = jQuery.Event("keydown"); e.which = 13; e.shiftKey = true; $(wym._doc).trigger(e); Is there any way to do it?

    Read the article

  • Best way to save user settings on client-side (javascript,jquery)

    - by Johua
    I have a settings page that a user can enter some text and save directly to a combobox. Next time when page loads, combobox is filled in with the previous entered text. Also i have a modify button, so the user can delete or edit a value from the combobox. My question is, what's the best way to save to user settings on the client with javascirpt/jquery? I can only think of using an array and then (push/pop).,,Anyone got some bad experience with arrrays? thx

    Read the article

  • HTML: upload-form in an other form

    - by chris
    hi! I have a little problem with an upload-form within an other form (call it data-form). I know it is not possible to put a form into an other. So I would need to put it after my data-form. But I need the upload-form controls in the middle of my data-form because of optical and structural reasons. The file-upload should also perform other actions and not the same than the data-form. So any idea how can I make the upload-form after my data-form but visible in it or any other ideas to handle this? I am using javascirpt and php also. thanks and best wishes for 2011! br,chris

    Read the article

  • JavaScript issues

    - by Michael
    My java scirpt is not working right. It is simple pre-vailidation form and I can not get the script to work. It is supposed to validate each field but I can not get it to validate past the first name. I stripped out all of the other garbage so the code would not be confusing Should be a copy paste to notepad. Little help please <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script language="JavaScript" type="text/javascript"> <!-- function validateForm(theForm) { var name = theForm.firstname.value; var name = theForm.lastname.value; var email = theForm.email.value; if (name == "") { alert("Please fill in your First Name."); theForm.firstname.focus(); return false; } if (name == "") { alert("Please fill in your Last Name."); theForm.lastname.focus(); return false; } if (email == "") { alert("Please fill in your email address."); theForm.email.focus(); return false; } return true; } //--> </script> if (!theForm.myCheckbox1.checked { alert("Please check the honor box."); return false; } </head> <body> </script> <fieldset> <legend>Fun in the Sun With JavaScirpt</legend> <ul> <form action="blah.cgi" method="post" onSubmit="return validateForm(this);"> First name: <input type="text" name="firstname"> <font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <br><br> Last name: <input type="text" name="lastname"> <font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <br><br> Email address: <input type="text" name="email"> <font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <br><br> Phone Number: <input type="text" name="phone"><br><br> <input type="submit" name="submit" value="Submit"> </form> <input type="checkbox" name="myCheckbox" value="someValue"><font color="#FF0000" size="1" face="Arial, Helvetica, sans-serif"><strong>*</strong></font> <P>By checking this Box you are confirming the data is accurate</p> <p>(* indicates a required field)</p> </body> </html>

    Read the article

1