The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> HTML form entry done broke, search box not adding search term, just acting as link
librarianlauren
post Feb 15 2017, 09:27 PM
Post #1





Group: Members
Posts: 2
Joined: 15-February 17
Member No.: 26,318



Hello,

I'm taking a class on web forms right now, but haven't gotten to the part where I can fix this. This part of the website is old markup (taken from a much older version of the website) and is supposed to allow the user to enter the name of a journal and then take them the results page. It doesn't do that. It just acts as a link.

Go ahead and take a look at http://library.shoreline.edu/home/

click the "Journals" tab in the box marked "Search Explore Discover"

http://imgur.com/drgXfP6

If you have the time and the patience to teach a librarian how the heck all this stuff is supposed to equal a web form, I'd be grateful. Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 16 2017, 12:34 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



I don't know. There should be a script (or several) and a database involved. We can't see those parts. sad.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 16 2017, 10:07 AM
Post #3


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



QUOTE(librarianlauren @ Feb 16 2017, 03:27 AM) *

Go ahead and take a look at http://library.shoreline.edu/home/

click the "Journals" tab in the box marked "Search Explore Discover"

That part worked in my browser when javascript is enabled. But when I submit the form I'm taken to another search form at exlibrisgroup.com. Then I need to search there yet again in order to see results.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 16 2017, 11:41 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Ah, it uses the database at another site. I never looked. I did now, and the form has two action attributes. That doesn't help. Alas neither seems to work. It has two method attributes to, but that doesn't hurt anything.

HTML
<form action="http://wactc-sfx.hosted.exlibrisgroup.com/shoreline/az?lang=eng/" method="get" name="SS_EJPSearchForm" class="navbar-form navbar-left" action="http://library.shoreline.com/srch.php" method="GET">


When I try to submit the form to http://library.shoreline.com/srch.php my browser tells me "This webpage has a redirect loop" and this is what I see in the addressbar... wacko.gif

CODE
http://www.www.www.www.www.www.www.www.www.www.
www.www.www.www.www.www.www.www.www.www.www.www.
www.www.www.www.www.www.www.www.www.www.www.www.
www.www.www.www.www.www.www.www.
library.shoreline.com/srch.php?C=The&N=100&V=1.0&L=cf9fj9lw6m&S=AC_T_B]
http://www.www.www.www.www.www.www.www.www...6m&S=AC_T_B

(I added the linebreaks to avoid a very long line)

Clicking the link above will give the same result.

Maybe your page used to use the script at library.shorline.com and now they've changed things?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 16 2017, 11:47 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Uh, no. They didn't change things, they ceased to exist.
http://www.shorline.com/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
librarianlauren
post Feb 27 2017, 04:42 PM
Post #6





Group: Members
Posts: 2
Joined: 15-February 17
Member No.: 26,318



Thanks for taking a look, guys. Yes, Christian J., it looks like you're seeing my problem. It lets me enter a term, but the term doesn't show up on the next page.

Pandy, I've changed the URL which should have been library.shoreline.edu not .com, but it seems to be acting the same. I'm going to paste the part that isn't working well here. The database it queries is just the one mentioned in the markup at http://wactc-sfx.hosted.exlibrisgroup.com/...ne/az?lang=eng/


<div role="tabpanel" class="tab-pane " id="journals" aria-labelledby="journalstab">

<div class="leslieKnope">
<form action="http://wactc-sfx.hosted.exlibrisgroup.com/shoreline/az?lang=eng/" method="get" name="SS_EJPSearchForm" class="navbar-form navbar-left" action="http://library.shoreline.edu/srch.php" method="GET">
<div class="form-group">
<input id="SS_CFocusTag" name="C" class="form-control dropdown1" placeholder="" size="12">
<input value="100" name="N" type="hidden">
<input value="1.0" name="V" type="hidden">
<input name="L" value="cf9fj9lw6m" type="hidden">
<select name="S">
<option value="AC_T_B" selected="selected">Title begins with</option>
<option value="AC_T_M">Title equals</option>
<option value="T_W_A">Title contains all words</option>
<option value="I_M">ISSN equals</option>
</select>
<button type="submit" class="btn btn-default">Search</button>
</form>
</div>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 27 2017, 07:33 PM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Oh, it was your own domain! I didn't notice. Anyhow, you can't have two action attributes. I sense it's the first one you want, so remove the shorline one.

The values of the name and value attributes you use must be the same as the ones the library site form uses. The text field at their site uses name="param_pattern_value" and yours use name="C". Change that and you'll have better luck.

Also, at the library site the only options are "Starts with" and "Contains", whereas you have 4 options. Two of them are no longer in use and you should remove them. You also need to change the values of the two you keep and the name of the SELECT. View source at the library page and check the current name and values for the radio buttons. They are not the same as you use but they are what you want to use.

Your form will work fine after you have fixed these things. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 27 2017, 07:44 PM
Post #8


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Actually, only one of your options is still valid. "Title contains all words" has changed to "Contains", so you should change that too.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Feb 27 2017, 07:48 PM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



If you don't know, the whole trick with forms is coupling name and value pairs. That's what you see in the query string in the URL when you have submitted the form. You see the same thing if you look at your browser's address bar here at the forum. The URL followed by a questionmark and a string of name-value pairs linked together with ampersands.

CODE
...?name1=value1&name2=value2&name3=value3...


The value can be given in the value attribute or typed in a field by the user.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 1 2017, 04:34 PM
Post #10


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



How does it go?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Krzewski
post Aug 31 2020, 07:57 AM
Post #11





Group: Members
Posts: 1
Joined: 31-August 20
Member No.: 27,524



Hello,
How long did you wait for the parcel? I bought product 3 weeks ago and so far have not received it. I'm wondering whether to report the matter.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 31 2020, 09:14 AM
Post #12


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



QUOTE(Krzewski @ Aug 31 2020, 02:57 PM) *

Hello,
How long did you wait for the parcel? I bought product 3 weeks ago and so far have not received it. I'm wondering whether to report the matter.

There are one or more scam sites copying content from https://forums.htmlhelp.com (this very forum). Some of the links lead customers back here. Which website did you make those purchases from?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th April 2024 - 11:26 PM