Results 1 to 4 of 4

Thread: Php form with javascript

  1. #1
    Join Date
    Apr 2008
    Posts
    240

    Php form with javascript

    Hi
    I am trying to change some of my code on my web site to something more suitable, more suitable to my user needs. Curretnly the user submits the id by the popup which comes, instead I want it to be in the form of embedded text filed. Here is my code
    Code:
    <script language="javascript">
    
    function raidlk() {
    	raid_link = prompt('Enter Raid ID:',"");
    	location = "5man.php?rlink="+raid_link;
    }
    </script>
    This is the code where people click to get the popup submit box
    Code:
    <a href=javascript:raidlk()><font color="#00FF00">__Insert Raid ID__</font>
    Now what I want is something like this
    Code:
    <form action="5man.php" method="post">
    id: <input type="text" id=id name="name" />
    <input type="submit" />
    </form>
    I just can find out how to replace this
    Code:
    <?=$_GET['rlink']?>
    Any help or suggestion for this.
    Last edited by Solaris; 30-11-2009 at 02:14 PM.

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Php form with javascript

    Hi
    I think this is what you are looking for, just check it out if it works for you. any more help do post back and even if you have solved the problem then post back with a solved reply.
    Code:
    <form action="5man.php" method="get">
    ID: <input type="text" name="rlink"><br>
    
    <input type="submit">
    </form>
    Best of luck.

  3. #3
    Join Date
    Apr 2008
    Posts
    240

    Re: Php form with javascript

    Hi
    Thanks for your reply
    I have inserted the form box where I want it, but it is still not working. When I enter the ID it dosnt submit as the id still remains in the textbook.
    Code:
    <?=$_GET['rlink']?>
    The code above should get the ID entered in the submit box.

  4. #4
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Php form with javascript

    Hi
    I am not sure if I have any more idea to it, still i will keep trying to solve it. Not sure but you can try this
    Code:
    <?php echo $_GET['rlink']; ?>
    If you solve this then do post back.

Similar Threads

  1. Calendar javascript in a JSP form
    By technika in forum Software Development
    Replies: 4
    Last Post: 22-02-2010, 07:10 PM
  2. How to Submit a Form Using JavaScript?
    By Damien25 in forum Software Development
    Replies: 4
    Last Post: 07-02-2010, 07:05 AM
  3. How to set the value of a form element using Javascript?
    By shivendra in forum Software Development
    Replies: 4
    Last Post: 07-02-2010, 05:04 AM
  4. How to use Form Validation in JavaScript?
    By Dilbert in forum Software Development
    Replies: 4
    Last Post: 30-01-2010, 08:30 PM
  5. Help me with onChange javascript event for php form
    By Brake Fail in forum Software Development
    Replies: 3
    Last Post: 22-07-2009, 11:42 PM

Tags for this Thread

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
  •  
Page generated in 1,713,514,248.89051 seconds with 17 queries