Jump to content

koushikgattu

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

koushikgattu's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Posts: 8 View Profile Email javascript form validation help « on: Today at 03:55:50 PM » Reply with quoteQuote Modify messageModify Hi, Is there any way that i could copy the one text box value into multiple text boxes(but part of the value) Lets say, i i have one text box for date (format mm/dd/yy) <input name="completedate" value="" type="text"> I want that value of the text box to be pasted on to three different text boxes.(mm in one textbox...date one text box and year in one text box) <form name="submitdate" method="post" id="submitdateForm" action="" > <input name="completedate" value="" type="text"> <input name="date" value="" type="text"> <input name="month" value="" type="text"> <input name="year" value="" type="text"> </form> To hide these three text boxes from display..i can put type="hidden". Can any one please help me with this? thanks
  2. Can't we do this by using javascript? we can split that value of the textbox(mm//dd/yy) using split("/") some thing link this ..but how to put that values in the appropriate text boxes?
  3. Hi, Is there any way that i could copy the one text box value into multiple text boxes(but part of the value) Lets say, i i have one text box for date (format mm/dd/yy) <input name="completedate" value="" type="text"> I want that value of the text box to be pasted on to three different text boxes.(mm in one textbox...date one text box and year in one text box) <form name="submitdate" method="post" id="submitdateForm" action="" > <input name="completedate" value="" type="text"> <input name="date" value="" type="text"> <input name="month" value="" type="text"> <input name="year" value="" type="text"> </form> To hide these three text boxes from display..i can put type="hidden". Can any one please help me with this? thanks
  4. But if try like this..its working.. <?php include_once DOC_ROOT."div.php"; ?> <script type="text/javascript"> function(new_container){ new_container.style.display = "block"; if (new_container.id == "tab_place") { populateSearchBox('ItemToSearch'); populateSearchLocation('locationList'); populate(); } </script> i have put previous div tag in div.php file
  5. How should i include php file in javascript? <div id="tab_place" align="center"></div> <script type="text/javascript"> function(new_container){ new_container.style.display = "block"; if (new_container.id == "tab_place") { <?php include_once DOC_ROOT."div.php"; ?> populateSearchBox('ItemToSearch'); populate(); } </script> this is including div.php file ..but not executing the functions populatesearchbox() and populate()?It is displaying the text as it is?(like populateSearchBox(''); populate(); ) (again div.php file has javascript) can any one help me with this? Thanks
  6. how can i search the 1st 5 characters of a string.here is sample code <?php if($_POST['submit']) { $url = "http://"; echo $url; $array = $_POST['usersite']; print 'You have selected these items:<ul>'; foreach($array as $item) { print $item . '<br />'; echo $url.$item; } print '</ul>'; } else { print '<form name=' . $_SERVER['PHP_SELF'] . ' method=post>'; print '<label for=item1>Usersite : </label><input type=text name=usersite[] value="" size="50" ><br />'; print '<input type=submit name=submit value=Submit />'; } ?> i want to append the "http://" to the value of the text box, if it is not entered by the user. For that i want to search the first 7 characters from the text box value. then if "http://" is not there i will append.if its present i will directly print the value. is there any way i could search a string like this? thanks
  7. Thank you for your replies. But i am just trying to print the arrays (array1 ,array2 etc) and concatenating them into one array(before clicking the submit button). Is there any way i could do that? thanks
  8. Hi, i am a beginner. I am having problem while printing the check box arrays and with the joining of arrays. here is the sample code: <?php $retval = '<form name="myform action="post"><input type="checkbox" name="array1[]" value="elem1" checked >feed1</label><br/>'; $retval .= '<input type="checkbox" name="array1[]" value="elem2" checked >feed2</label><br/>'; $retval .= '<input type="checkbox" name="array2[]" value="elem3" checked >feed3</label><br/>'; $retval .= '<input type="checkbox" name="array3[]" value="elem4" checked >feed4</label></form>'; echo $_POST['array1[]']; print_r($_POST['array1[]']); //print_r($array2); //print_r($array3); ?> I am trying to print the array1[], array2[], and array3[] and also put the elements of these arrays into one array(with out override).Can somebody help me with this? Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.