# Split string for deep link

**URL:** <https://forum.kirupa.com/t/split-string-for-deep-link/259093>\
**Category:** Uncategorized\
**Created:** [May 1, 2008, 1:40am UTC](https://forum.kirupa.com/t/split-string-for-deep-link/259093 "2008-05-01T01:40:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [May 1, 2008, 1:40am UTC](https://forum.kirupa.com/t/split-string-for-deep-link/259093/1 "2008-05-01T01:40:33Z")

</div>

Hello everyone,

How can i split my link so i only get the second part out of my link  
right now i’m getting this: [http://somesite.com/index.html?bpKey=Hub\_Intro](http://somesite.com/index.html?bpKey=Hub_Intro)  
and i only want the second part of this : bpKey=Hub\_Intro to

please help out! :hr:

i have this piece of code here :

```auto

</div>

          <div style="text-align:middle; margin-middle:">
              <FORM NAME="myform">
            
            <SELECT NAME="mylist" onChange="nav()">
            <OPTION VALUE="none"> Select a language
            <OPTION VALUE="../fr/"> Français
            <OPTION VALUE="../de/"> Deutsch
            </SELECT>
            </FORM>
          
      </div>

<SCRIPT LANGUAGE="javascript">

  var deepLink = '';

 function nav()
   {
   var w = document.myform.mylist.selectedIndex;
   var url_add = document.myform.mylist.options[w].value;
      if (url_add != "none")
      {
          window.location.href = url_add + "?" + deepLink;  
      }
   }

  function setDeepLink( dl ) {
    alert(dl);
    deepLink = dl;
  }

</SCRIPT>

```
