58 users online (1 members and 57 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 15
  2. input to link to htm page    Forum: Website Scripts Forum
    Replies: 4
  3. Form input link    Forum: HTML Forum
    Replies: 9
  1. #1
    cyrene's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2004
    Posts
    8

    Question get input onchange into link

    I have some links such as web,images and Sound file and an input text with default value(query). When no changes in input text and user click on any link,it will go to search the qurey according to the link.

    But the problem is when there is changes in input text and user click on the link.It keep to search the old query according to link.

    I wish it able to detect and search new query.

    Here my code:

    Code:
    <script LANGUAGE="JavaScript">
    function setquery(newquery) { 
        var query = newquery;
    } 
    </script>
    
    
    print qq(<a href="/cgi-bin/result.cgi?cat=1&query=$query">WEB</a>&nbsp;&nbsp;
    			<a href="/cgi-bin/result.cgi?cat=2&query=$query">IMAGES</a>&nbsp;&nbsp;
    			<a href="/cgi-bin/result.cgi?cat=3&query=$query">SOUND FILE</a>&nbsp;&nbsp;		
    			
    			<br>
    			<form name="form_search" method="post" action="/cgi-bin/result.cgi">
            	        <div align="center"> 
            	        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="query" value="$query" size="30" onchange="setquery(this.value)">
            	        &nbsp;&nbsp; 
            	        <input type="submit" name="submit" value="Web Search" style="background-color:  #FFFAFA;">
            	        &nbsp;&nbsp;<a href="/adsearch.html" class="one"><font size="-1">advanced web
            	        search</a> 
            	        <input type="hidden" name="cat" value=1>
            	        </div>
            	        </form>);								}
    How Perl can get the changes in input text and assign it into link when user click on it?
    Last edited by HTML; 12-14-2004 at 10:15 AM.

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Could you post a link to it? I would like to view source on it after it has been parsed by perl
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    cyrene's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2004
    Posts
    8

    i solve the problem

    i solve this problem by having some new links for old query and set input text for new query only



Tags for this Thread