Id search box

Discussion in 'HTML & Website Design' started by xJd09, Feb 2, 2010.

  1. #1
    hello im needing a search box ill explain it detailed so yall can help me with pls

    im a myspace mob player and got my own site so ive been trying to make an id search code..

    is there a code so lets say

    when someone type an id for example : 514253932 and click search

    a link will pop : http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=104283&appParams={%22show_user_id%22%3A"514253932"}

    what i want is that any id that ppl type to search it makes it appear between the http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=104283&appParams={%22show_user_id%22%3A" AND "}


    SO FULL LINK WOULD BE http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=104283&appParams={%22show_user_id%22%3A"514253932"} << the id appears between in there .. so is there a way to make any id u type it pops that same link but with the id that person typed in the link. ty
     
    xJd09, Feb 2, 2010 IP
  2. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Clientside:

    
    <script type="text/javascript">
    	function validateJump() {
    		var sbRedirect = document.searchBox; 
    		if (sbRedirect.uid.value.length == 0) { sbRedirect.uid.focus(); }
    		else { window.location = 'http://profile.myspace.com/Modules/Applications/Pages/Canvas.aspx?appId=104283&appParams=%7B%22show_user_id%22%3A%22'+sbRedirect.uid.value+'%22%7D'; }
    	}
    </script>
    <form name="searchBox" id="searchBox">
    	<input id="uid" name="uid" /> <input type="button" id="btnSub" name="btnSub" value="Search" onclick="validateJump();" />
    </form>
    
    Code (markup):
     
    krsix, Feb 4, 2010 IP
  3. xJd09

    xJd09 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    nice bro it works perfect , thnx i got a question .. what should i add in the code to make the link open in new tab?
     
    xJd09, Feb 4, 2010 IP