homepage Welcome to WebmasterWorld Guest from 184.73.40.21
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Browsers / Firefox Browser Usage and Support
Forum Library, Charter, Moderators: incrediBILL

Firefox Browser Usage and Support Forum

    
window.open is not working in FireFox
tsui3276

5+ Year Member



 
Msg#: 3924240 posted 9:11 pm on Jun 1, 2009 (gmt 0)

My page has a form. When a user select a value from the dropdown menu and click on the submit button to trigger a javascript function. Then a result will be displayed at the same page. I'm able to make this happen in IE using the window.open command, but when testing under FireFox or Safari. Nothing happened. I googled and found out that the window.open is not working in Firefox or Safari because the Ad blocker. Can anyone show me how to fix this since I'm a naive on Javascript? I copied the code from other web site.

Below are my codes:

<script language="JavaScript" type="text/JavaScript">
function See_Rates2()
{
var x=document.getElementById("mySelect2")
ct=x.options[x.selectedIndex].text
rt=x.options[x.selectedIndex].text
window.open('rates.asp?ct='+ct+'&rt='+rt,'_top');
}
</script>
<%
ct=request.QueryString("ct")
rt=request.QueryString("rt")

set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open(Server.Mappath("abc.mdb"))
%>

.......

<option value='<%=rs("Country")%>'
<%if rs("Country")=ct then response.Write("selected")%>><%=rs("Country")%></option>
<% rs.movenext
loop
%>
</select>

<a href="#" ><img src="images/BT_Search.gif" alt="See Rates" name="Rates" width="38" height="23" border="0" align="top" onClick="See_Rates2()">

 

lavazza

5+ Year Member



 
Msg#: 3924240 posted 11:23 pm on Jun 1, 2009 (gmt 0)

I recommend you read up on accessibility and rethink your approach, which is essentially ignoring the adage of 'Don't Break the Back Button'

Google: Results 1 - 26 of 26 from webmasterworld.com for "break the back button" [google.com]

Browser Side World / HTML and Browsers Mastery, Mystery and Misery - Jakob Nielsen [webmasterworld.com]

tedster said:

In his new Alertbox column, Jakob Nielsen serves up some excellent points.

MASTERY: A simple user interface is not boring. It excites users because it lets them connect with the content and engage the company behind the site.

MYSTERY: Website designers stare at their designs all day, every day. In contrast, users visit for four minutes and then leave....Don't aim at an exceptional experience for yourself and your team members.

MISERY: ...mainly espoused by certain analysts who wish the Web would turn into television and offer users no real choices at all. Splash pages, pop-ups, and breaking the Back button are typical examples of the misery ideology.

[useit.com...]

Also...

  • The syntax for including javascript in (valid) HTML is
    <script type="text/javascript">
    rather than
    <script language="JavaScript" type="text/JavaScript">

A question:

  • What language uses <%?

incrediBILL

WebmasterWorld Administrator incredibill us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3924240 posted 2:09 am on Jun 2, 2009 (gmt 0)

I googled and found out that the window.open is not working in Firefox or Safari because the Ad blocker.

Why are you running AD Blocker if it's stopping your code from working?

Your code will work fine for everyone not blocking ads.

For those blocking ads, you're done, using your current methodology.

However, the technology to display tooltips or floating windows inside your current windows seems to bypass ad blockers quite nicely but it's floating within the same window.

For example, the "DHTML Window widget" should solve your problem.

[edited by: incrediBILL at 3:46 am (utc) on June 2, 2009]

tsui3276

5+ Year Member



 
Msg#: 3924240 posted 1:29 pm on Jun 2, 2009 (gmt 0)

The page is written in ASP.

Many people has turned on the popup blocker and my targeted customers can't see the result because Firefox prevent the window.open to execute.

In my case, the floating window is not quite fitting. I have a dropdown menu for people to select where is the country to calling to. When they submit the query, the rates will be displayed at the same page.

Try to view the page from IE, you'll see the rates after submit your query. But it's not working at Firefox.

[edited by: incrediBILL at 4:45 pm (utc) on June 2, 2009]
[edit reason] removed URL, see TOS #13 [/edit]

incrediBILL

WebmasterWorld Administrator incredibill us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 3924240 posted 4:50 pm on Jun 2, 2009 (gmt 0)

There are a lot of people in Firefox running NOSCRIPT too, so even if they didn't have the AdBlock running your script still wouldn't work.

However, the ad blockers are still a small percentage of the total web surfing population and Firefox is also a smaller percentage than MSIE, so the number of people running FF and blocking ads isn't as great as it might seem.

The number of people running MSIE and blocking ads would probably be much higher.

Anyway, you could anchor the floating window in a corner out of the way, or make it pop ON/OFF when the options were selected, it doesn't need to be there all the time, it can just pop up to display as needed and go away.

Also, you could put the data you want to display in an iframe and update it from the server using AJAX, there are lot's of implementation possibilities that avoid popups.

cquyf

5+ Year Member



 
Msg#: 3924240 posted 3:40 am on Jun 14, 2009 (gmt 0)

do you write the code in asp?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Browsers / Firefox Browser Usage and Support
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved