The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How can I make my html google search box results open in the same tab
redrum
post Apr 12 2013, 07:24 PM
Post #1





Group: Members
Posts: 4
Joined: 12-April 13
Member No.: 19,004



As above. I've searched everywhere but nothing seems to work I would really appreciate any help with this.
This is the code:

<form method="get" action="https://www.google.co.nz/search">
<input type="text" name="q" size="71"
maxlength="255" value="" />
<input type="image" src="http://s20.postimg.org/c59oh35u5/google.png" style="height:30px;
width:30px" name="btnG" value="Google Search" class="lsb"></form>

This post has been edited by redrum: Apr 12 2013, 07:28 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 12 2013, 08:31 PM
Post #2


WDG Member
********

Group: Root Admin
Posts: 8,316
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



I don't see anything in that markup that would cause the form to open in a new tab. My guess is that it's some sort of security issue, with a tab or frame or iframe owned by one domain, and the results owned by www.google.co.nz not being able to open in the tab or frame or iframe owned by the other domain. But that's just a guess. To investigate further, I'd need the URL (address) of a page that demonstrates the problem.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
redrum
post Apr 12 2013, 10:04 PM
Post #3





Group: Members
Posts: 4
Joined: 12-April 13
Member No.: 19,004



Thanks, heres my site (its a google site) https://sites.google.com/site/beckysfirefox/home
I used an html box to make the search box. It opens in a new tab in firefox and a new window in IE.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 13 2013, 01:18 AM
Post #4


WDG Member
********

Group: Root Admin
Posts: 8,316
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Well, yeah. That's what target="_blank" does; it opens a new, unnamed window.

If you don't want that, then remove the target="_blank" attribute.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
redrum
post Apr 13 2013, 01:57 AM
Post #5





Group: Members
Posts: 4
Joined: 12-April 13
Member No.: 19,004



But I don't have "target="_blank"" in the code...

Edit - ah i see that it is there when I use the inspector - I'm not sure how to change it though as google sites must be adding it somehow?

Sorry if this is a silly Question - I'm new at this - but is there an html eQuivalent to the css important rule that i can use to override it with "_self"?

This post has been edited by redrum: Apr 13 2013, 02:20 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
redrum
post Apr 13 2013, 04:46 AM
Post #6





Group: Members
Posts: 4
Joined: 12-April 13
Member No.: 19,004



I got around it by changing the settings in about:config
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: 12th November 2019 - 02:33 PM