Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 5th, 2006, 08:49 PM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I add keyword to the javascripted url?

How do I add keyword to the javascripted url?
It's for the onchange and the iFrame. Once the dropdown is selected then the iFrame would show the verse.
I have an old code that looked like this:
Code:
location = "kjvresplistboxshowversea.id.options[document.myForm.id.selectedIndex].value + "&Keyword=" + document.myForm.Keyword.value + "&Keywordb=" + document.myForm.Keywordb.value + "&Keywordc=" + document.myForm.Keywordc.value + "&Keywordd=" + document.myForm.Keywordd.value + "&Keyworde=" + document.myForm.Keyworde.value + "&Keywordf=" + document.myForm.Keywordf.value + "#bcv
Code:
    <script language="JavaScript" type="text/javascript">
    <!--
        function go1()
        {
        booksa.action = "showversea.asp?id=";
        booksa.submit();
        }
    //-->
    </script>

        <form name="booksa" action="showversea.asp" method="get" target="ifrVerse">
        <select name="id" size="10" style="width:200;" onchange="go1();">

                <option  value="5276">Deuteronomy&nbsp;13:3</option>

                <option  value="8319">2 Samuel&nbsp;13:1</option>


                <option  value="8322">2 Samuel&nbsp;13:4</option>

                <option  value="8333">2 Samuel&nbsp;13:15</option>

                <option  value="12698">Nehemiah&nbsp;13:26</option>

                <option  value="16341">Psalms&nbsp;145:20</option>

                <option  value="16772">Proverbs&nbsp;13:24</option>


                <option  value="18774">Isaiah&nbsp;57:8</option>

                <option  value="26632">John&nbsp;13:1</option>

                <option  value="26654">John&nbsp;13:23</option>

                <option  value="26665">John&nbsp;13:34</option>

                <option  value="26666">John&nbsp;13:35</option>


                <option  value="28275">Romans&nbsp;13:8</option>

                <option  value="28276">Romans&nbsp;13:9</option>

                <option  value="28277">Romans&nbsp;13:10</option>

                <option  value="29055">2 Corinthians&nbsp;13:11</option>

                <option  value="29058">2 Corinthians&nbsp;13:14</option>


                <option  value="30243">Hebrews&nbsp;13:1</option>

        </select>


Martial Law 9/11 Rise of the Police State is now available! Visit our Martial Law movie section for complete info (click here), or order now by clicking the button below or by calling 888-253-3139
http://www.infowars.com/martial_law_911.htm
Reply With Quote
  #2 (permalink)  
Old January 6th, 2006, 04:14 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I don't quite understand your first line of code but if you add:
Code:
onchange="go1(this.options[this.selectedIndex].value);"
to your select and then have something like:
Code:
function go1(id)
{
  booksa.action = "showversea.asp?id=" + id;
  booksa.submit();

}
Are you sure you want to submit rather than just redirect?
Code:
function go1(id)
{
  window.location.href = "showversea.asp?id=" + id;
}

--

Joe (Microsoft MVP - XML)
Reply With Quote
  #3 (permalink)  
Old January 6th, 2006, 11:13 AM
Friend of Wrox
Points: 1,107, Level: 13
Points: 1,107, Level: 13 Points: 1,107, Level: 13 Points: 1,107, Level: 13
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2004
Location: , , .
Posts: 240
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I want to add keyword as in:
&keyword=
in the url with the keyword searched.

Martial Law 9/11 Rise of the Police State is now available! Visit our Martial Law movie section for complete info (click here), or order now by clicking the button below or by calling 888-253-3139
http://www.infowars.com/martial_law_911.htm
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add image in url address bar? saurabh ASP.NET 3.5 Professionals 1 July 11th, 2008 05:53 AM
URL rewriting with URL forwarding mtabyana BOOK: Professional Search Engine Optimization with PHP: A Dev's Guide to SEO ISBN: 978-0-470-10092-9 0 October 22nd, 2007 08:22 AM
Add parameter to "navigation" url - roy_mm Reporting Services 1 October 16th, 2006 07:00 AM
Automatically add querystring paramaters to URL trancehead ASP.NET 2.0 Professional 0 July 24th, 2006 03:03 AM
extract URL from Favorites (.URL Files) PhilHawks VB.NET 2002/2003 Basics 2 November 2nd, 2004 03:35 AM



All times are GMT -4. The time now is 02:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.