SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2007
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem accessing variable value in another form.

    Hi all,
    I'm actually trying to get a text box value from one form to the other form. I'm using the below code for transfering the textbox value,

    Code:
    <input type=text id=searchbox name=search size=18 align=right> </td> <td><input type="button" target=menu value="Go" onclick="fifthframe(document.getElementById('searchbox').value)"> </td>
    The fifthframe function is a javascript func as below:

    Code:
    function fifthframe(search) { if(search=="users") { parent.top.location.href="index.html" parent.menu.location.href="menu.html" } parent.main.location.href="search_home.php?search="+search }
    But when i try to access this text box value in the other php page, if its given as "aac+" or "ac3+" in the text box, i'm able to access only "aac" or "ac3", the "+" symbol is trimmed off! How do i transfer this "+" from one form to another? Please help.

    Thanks,
    Ramki.

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2007
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody please help me.

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    parent.main.location.href="search_home.php?search=" + encodeURIComponent(search);

  4. #4
    SitePoint Zealot
    Join Date
    Oct 2007
    Posts
    118
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jimfraser View Post
    Code:
    parent.main.location.href="search_home.php?search=" + encodeURIComponent(search);
    Hey thanks fimfraser, it worked!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •