Jump to content

miteshbhimjiyaani

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by miteshbhimjiyaani

  1. hi...the code given by scott is working fine..but when i put the code in the jsp..its not working properly..for every input iam getting negative error "invalid entry"i have seprate function for length validationand finally onBlur='Jscript:validatefield();'function validatefield(){  var tomatch=/[A-Za-z0-9]\w{1,}[0-9]\d{2}/        if(tomatch.test(document.pos))        {          alert("valid entry for the field")        }      else         {          alert("Invalid entry to field")        }}

    hi can u send me whole code ? one more thing what is document.pos ?
  2. Thank you for the answer, and sorry for didn´t show you my complete code.I have to use the code below, to know wich checkbox is selected.With your solution, I will resolve the problem with the command c.length.But I still have a problem with the command "c.checked", when I have just one checkboxvar c = document.AlterarExcluirForm.checkbox;for ( var i=0; i < c.length; i++ ){if ( c.checked == true ){tem_selecao = true;break;}}

    hi,some modification alert(inp.checked);
    <form id="AlterarExcluirForm" action="#"><input type="checkbox" checked/><input type="checkbox" /><input type="checkbox" /></form><script type="text/javascript">var cnt = 0;var inp = document.getElementById("AlterarExcluirForm").elements; // all inputsfor (var i = 0; i < inp.length; i++)if (inp[i].getAttribute("type") == "checkbox"){ alert(inp[i].checked);cnt++;}alert(cnt); //there is 3 checkboxes now</script>

  3. Hi all!Im sorry to say but this dose not work at all!When I added the & #39; part it dont open the chatpage in a new window any more. It opens it in the same window as the login page is in.Look at this:
    <script>function cForm(form){win=window.open('','Chatt',& #39;height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes);form.target='Chatt';}</script>

    Like you told me to right? The script function is used by a onClick in a form. We can look at that too:

    <form action="http://exampel/chat.php" method="post"><input type="hidden" name="first" value=true><p> <input name="submitButton" type="submit" value="Enter" onclick="cForm(this.form)"></p></form>

    Before i added the & #39 bit it was working fine. Exept for the resizeing thing.Im not that familiar with Java Script. I hope some one can help me find the problem here./Per

    hi ,remove & #39; with single quote then it will work
  4. Hi all!Its me again Per.I almost have a working chatroom now. Some small things left.When I open a new window for the chat page it dosn't get resizeble as I whant it to be.
    win=window.open('','Chatt','height=600','width=800','status=no','toolbar=no','menubar=no','location=no','resizable=yes');

    Can anyone figure out why this dont work?/PerPS. The height and width is in pixels right? It dosn't seems to be as big as a would like.

    hi try this :win=window.open('','Chatt','height=600,width=800,status=no,toolbar=no,menubar=no,location=no,resizable=yes');it will work
  5. <script language="JavaScript" type="text/javascript"><!--function dovalidate(){var submit_accepted = false;var chk_val = true;var AllowedChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_01234567890"var AllowedNumbers = "0123456789"var frm = document.EmpEntryif (submit_accepted)  // prevents NN4 resubmission        return(false);if (frm.txtFName.value == "")	{	alert ("Enter First Name of Labour/Employee (i.e initial)");	frm.txtFName.focus();	return false;	}if (frm.txtName.value == "")	{	alert("Enter Name of Labour/Employee");	frm.txtName.focus();	return false;	}	if (chk_val)        //regform.p_js_on.value = 1;//	frm.ButSubmit.value = "Please Wait..."//    frm.ButSubmit.disabled = chk_val;//    alert (chk_val)    submit_accepted = chk_val;return chk_val;}function gowhere(regfrm){	if (dovalidate())  {  alert("Okay")  regfrm.submit()  return true;	  }	}--></script><form [B]action=""[/B] method="post" name="EmpEntry" onSubmit="return gowhere(this);"><input name="txtFName" type="text" size="5" value=""> <input name="txtName" type="text" value="" size="30"><input type="submit" name="ButSubmit" value="Submit"></form>

    Dear Friends,I got Problem From this code,when i fire the from the from is not Submitting and i got the error: Access is denied(Javascript) if i comment the line "regfrm.submit()", its says nothing and page dose'nt fire, pls tell me How to solve the problem.NB : Its an ASP page

    ==hi , code is working fine in IE as well as Mozilla , may be u r missing next action page (which i showed in bold text ), just give action page name, it will work.thanks
  6. I have followed a tutorial example  1) I opened up NOTEPAD.exe2) I pasted the following code into the notepad document3) I saved it as Hello.htmTHIS IS THE CODE WHICH DISPLAYS NOTHING<html><body><%response.write("Hello World!")%></body></html>When I execute the open command I get NOTHING on the screenIs this code incorrect (it came from the tutorial web site)Why is this so difficult ???

    hi ,the above code is won;t working. if u wana display only hello world then use below code<html><head><script>document.write("Hello World!")</script></head><body></body></html>Reason : y ur code is not working bz it is html file not jsp or asp. that will work on server side.Thanks
×
×
  • Create New...