473,837 Members | 1,450 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP \ JAVASCRIPT \ FIrefox and Safari issues - please help!!

2 New Member
Can anyone help me please (i am quite a novice, but having fun learning). Im not sure if this is an ASP problem, a javascript problem or a browser problem.

Firstly, everything i have written works fine in IE7 and beta IE8. My pages do not work however in Safari or Firefox, and please dont beat me, but i use Frontpage to write my site, and i use iframes as ive not discovered how to do this any differently!

So the issue is this, i have a large database of music, on selecting an item from the menu, frame 1 gets populated with song titles, on clicking one of the song titles, another frame is fpopulated wtih content, images and text, and a 3rd frame is populated with release and chart information and a 4th frame is populated with reviews of that record.

You can see it in action here : http://www.eurythmics.me.uk/discogra...ographynew.htm

The code i have in the ASP page for selecting the track is as follows, and i think it is this line that causes the problem:

Response.Write( "<a target=""_self" " href=""javascri pt:setframes('t itle.asp?Title= " & Server.HTMLEnco de(objRS("TITLE ")) & "&format=" & Server.HTMLEnco de(objRS("ALBUM SINGLE")) & "','chartdetail s.asp?Title=" & Server.HTMLEnco de(objRS("TITLE ")) & "&format=" & Server.HTMLEnco de(objRS("ALBUM SINGLE")) & "','../../../reviews/reviews.asp?Tit le=" & Server.HTMLEnco de(objRS("TITLE ")) & "');"">" & trim(UCASE(objr s("Title"))) & "</a><br>")

Here's the whole page.
Expand|Select|Wrap|Line Numbers
  3. <%
  4. Dim objConn
  5. Set objConn = Server.CreateObject("ADODB.Connection")
  6. objConn.Open Application("EurythmicsDatabase_ConnectionString")
  7. Dim objRS, Sql, SortOrder, AZColour, ReleaseColour
  8. SortOrder="TITLE"
  9. AZColour="#FF0000"
  10. ReleaseColour="#FFFFFF"
  11. If Request.QueryString("SortBy")<>"" Then
  12. SortOrder=Request.QueryString("SortBy")
  13. AZColour="#FFFFFF"
  14. ReleaseColour="#FF0000"
  15. End If
  17. '********************************************************************
  18. 'New Code for single page query. Need to pass Artist and Format in Query String
  19. 'Example Query String from link would be test.asp?ARTIST=eurythmics&albumsingle=Single
  20. 'Also need to make sure we pass those details when sorting the page so JavaScript needed to be amended
  21. '*********************************************************************
  22. Dim SortFormat, SortArt
  23. SortArt=trim(Request.QueryString("Artist"))
  24. SortFormat=trim(Request.QueryString("AlbumSingle"))
  25. Sql="SELECT MainListTbl.TITLE, MainListTbl.ReleaseDate, MainListTbl.AlbumSingle FROM MainListTbl where MainListTbl.ARTIST='" & SortArt & "' And MainListTbl.ALBUMSINGLE='" & SortFormat & "' Group By MainListTbl.TITLE, MainListTbl.ReleaseDate, MainListTbl.AlbumSingle Order By " & SortOrder
  27. 'End of new code
  28. '***********************************************************************
  29. Set objRS=objConn.Execute(Sql)
  30. %>
  31. <html>
  33. <head>
  34. <style TYPE="text/css"> 
  35. <!-- 
  36. A:LINK, A:VISITED, A:ACTIVE { text-decoration: none } 
  37. //--> 
  38. </style> 
  39. <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  40. <title>Eurythmics Singles</title>
  41. <base target="main">
  42. <script language="javascript">
  43. function sortpage(v){
  44. window.location='<%=Request.ServerVariables("Script_Name")%>?Artist=<%=SortArt%>&AlbumSingle=<%=SortFormat%>&SortBy='+v
  45. }
  46. </script>
  48. <script language="javascript">
  49. function setframes(m,t,b)
  50. {
  51. parent.document.getElementById("I2").src = m 
  52. parent.document.getElementById("I3").src = t 
  53. parent.document.getElementById("I4").src = b
  54. }
  55. </script>
  56. <meta name="Microsoft Theme" content="eurythmics 1011, default">
  57. </head>
  59. <body topmargin="1" leftmargin="1" rightmargin="1" bottommargin="1" marginwidth="1" marginheight="1">
  63. <b>
  65. <font face="Trebuchet MS" style="font-size: 9pt">
  66. <font color="<%=AZColour%>">
  67. <font color="#800000">Sort By</font><a target="_self" class="AZ" href="javascript:sortpage('');">&nbsp;<font color="#808080">A-Z</font></a></font><font color="#800000">&nbsp;or</font><font color="<%=ReleaseColour%>"><a target="_self" class="Rel" href="javascript:sortpage('ReleaseDate');"><font color="#800000"> </font>
  68. <font color="#808080">Release Date</font></a></font></font><font color="#808080" face="Trebuchet MS" style="font-size: 9pt">
  69. </font>
  70. <font face="Trebuchet MS" style="font-size: 9pt">
  71. <br><br>
  72. <%
  73. Do until objRs.EOF
  74. Response.Write("<a target=""_self"" href=""javascript:setframes('title.asp?Title=" & Server.HTMLEncode(objRS("TITLE")) & "&format=" & Server.HTMLEncode(objRS("ALBUMSINGLE")) & "','chartdetails.asp?Title=" & Server.HTMLEncode(objRS("TITLE")) & "&format=" & Server.HTMLEncode(objRS("ALBUMSINGLE")) & "','../../../reviews/reviews.asp?Title=" & Server.HTMLEncode(objRS("TITLE")) & "');"">" & trim(UCASE(objrs("Title"))) & "</a><br>")
  75. objrs.movenext
  76. loop
  77. %>
  78. </font>
  79. <div id="staticbuttons" style="position:absolute;">
  80. <font face="Trebuchet MS" style="font-size: 9pt">
  81. <a href="javascript:" onmouseover="myspeed=-thespeed" onmouseout="myspeed=0"><img
  82. src="http://www.eurythmics.me.uk/websitegraphics/arrows_up.gif" border="0"></a><br>
  83. <a href="javascript:" onmouseover="myspeed=thespeed" onmouseout="myspeed=0"><img
  84. src="http://www.eurythmics.me.uk/websitegraphics/arrows_dn.gif" border="0"></a>
  85. </font>
  86. </div>
  88. <font face="Trebuchet MS" style="font-size: 9pt">
  90. <script>
  92. //Page Scroller (aka custom scrollbar)- By Dynamic Drive
  93. //For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
  94. //This credit MUST stay intact for use
  96. var Hoffset=30 //Enter buttons' offset from right edge of window (adjust depending on images width)
  97. var Voffset=470 //Enter buttons' offset from bottom edge of window (adjust depending on images height)
  98. var thespeed=3 //Enter scroll speed in integer (Advised: 1-3)
  100. var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
  101. var myspeed=0
  103. var ieHoffset_extra=document.all? 15 : 0
  104. var cross_obj=document.all? document.all.staticbuttons : document.getElementById? document.getElementById("staticbuttons") : document.staticbuttons
  106. function iecompattest(){
  107. return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
  108. }
  110. function positionit(){
  111. var dsocleft=document.all? iecompattest().scrollLeft : pageXOffset
  112. var dsoctop=document.all? iecompattest().scrollTop : pageYOffset
  113. var window_width=ieNOTopera? iecompattest().clientWidth+ieHoffset_extra : window.innerWidth+ieHoffset_extra
  114. var window_height=ieNOTopera? iecompattest().clientHeight : window.innerHeight
  116. if (document.all||document.getElementById){
  117. cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
  118. cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px"
  119. }
  120. else if (document.layers){
  121. cross_obj.left=dsocleft+window_width-Hoffset
  122. cross_obj.top=dsoctop+window_height-Voffset
  123. }
  124. }
  126. function scrollwindow(){
  127. window.scrollBy(0,myspeed)
  128. }
  130. function initializeIT(){
  131. positionit()
  132. if (myspeed!=0){
  133. scrollwindow()
  134. }
  135. }
  137. if (document.all||document.getElementById||document.layers)
  138. setInterval("initializeIT()",20)
  140. </script>
  141. </b>
  142. </body>
  144. </html>
Apr 27 '08 #1
5 2694
979 Recognized Expert Contributor
Hi loveshack,

You haven't actually said what the problem is! What doesn't work in Firefox and Safari - is it layout or are you actually geting an error? If so what is it?

Also, your link didn't work - can you check it for me?

I'm happy to help once I know what the problem is! :-)

Dr B
Apr 28 '08 #2
2 New Member
Hi Dr. B

Sorry about the link, here it is again

[HTML]http://www.eurythmics. me.uk/Discography/Artists/EurythmicsMainD iscog.htm[/HTML]

Basically after selecting a record from the top menu, a list appears in the left hand frame, the centre frame will get populated when you click on any of the titles, and once that frame is populated, either selecting an image or hyperlink the far right hand frame populates - Everything works fine in IE, but in Firefox and Safari, nothing appears in the centre frame, no obvious error messages anywhere.

Many thanks!

Apr 28 '08 #3
979 Recognized Expert Contributor
Hi Steve,

Have you got Firebug installed on your version of Safari? It's a really handy Javascript debugger that you can download for free from the Mozilla website.

After browsing your page using FireFox, Firebug came up with these two errors:

missing ; before statement

on the following line. I think it might be the two double quotes you've got before the url that are causing the problem.
Expand|Select|Wrap|Line Numbers
  2.  <script type="text/javascript">var dmWorkPath = ""http://www.eurythmics.me.uk/discography/artists/eurythmicsdiscog.files/";</script>
And parent.document .getElementById ("I2") has no properties

on the following line.
Expand|Select|Wrap|Line Numbers
  2. parent.document.getElementById("I2").src = m
I'm not 100% sure about this one but it might be that you need to do something like the following:

Expand|Select|Wrap|Line Numbers
  1.  dim var 
  2. var = parent.document.getElementById("I2")
  3. var.src = m
I'm not a Javascript expert but you might find that something like the above will work for you.

Let me know how you get on with these errors and I'd suggest you install Firebug as you'll find it a big help debugging your scripts.

Hope this helps,

Dr B
Apr 28 '08 #4
7,435 Recognized Expert Expert
I'm just now getting back into js so ....

Is parent.document ... correct nowadays? I thought we were to use only document dot etc.
Apr 29 '08 #5
7,435 Recognized Expert Expert
In any case, you have misplaced meta tags and other errors that need fixing. The error console says you are sending CSS as text/html, too.

Use a modern browser to test your pages in. Don't trust IE. Firefox has the excellent Firebug debugger which you should use.
Apr 29 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Giuseppe Chielli | last post by:
Hi! I'm new to this newsgroup. I have a problem: I need to get the window size via Javascript; I usually use window.innerWidth or document.body.clientWidth with IE and Firefox and it properly works, but it doesn't work with Safari. It returns null or undefined... How can I get the window size on Safari? Thanks a lot to everyone.
by: Chris Mahoney | last post by:
Hi I'm using several Sessions in my app. When the user has cookies enabled in their browser, everything works fine. But with cookies disabled, only IE seems to remember the sessions. In Firefox and Safari, the session values seem to be "forgotten". I've looked around on Google but can't find any solutions to this problem. Plus I don't know how debug with Firefox (eg. step through the code).
by: tony dong | last post by:
Hi There After I developed portal application, it is working very well in IE browser, but it is not working using firefox, safari browser etc. The problem is the web part drag and drop function did not happen by default, so the client can't select the web part for drag and drop. Any one know why this happen and is it dotnet problem or browser problem or blah blah?
by: cewisham | last post by:
I have a menu that pops up different layers as you mouse over. Seems to work OK in IE 6. I position the layers dynamically with javascript because the menu moves when users resize their browser window. In the Firefox or Safari browsers the position of the layers is 0,0 no matter what, right off the bat. Top left corner. Can any one tell me why? Here is my javascript function for positioning the layers. Below that is the URL of the page...
by: cbjewelz | last post by:
Hey all. So I'm having problems with cross browser alignments. I'm looking at Safari and Mozilla Firefox. I develop in Safari and so it looks perfect there however in Firefox my vertical alignments and div widths are off. It's as if firefox has a different definition of a pixel than safari. Here is the url: http://theprize.chemouni.com/testing.php. When you select the Option from the pull down, the first part of the form appears. Then when...
by: Benedictum | last post by:
I have added the BrowserCaps in web.config file but it did not do anything in the prsentation of the web page. Is there anything else to do to have Firefox render the page like IE?
by: DanWeaver | last post by:
I have a panel on an asp page that has about 20 controls on it, an ajax update panel within it- text boxes, listboxes, imgbuttons etc. I would like to be able to copy this panel- ie put similar but independent functionality elsewhere on the page - it seems like a class but information on the web is confusing. How can I reuse code and controls/ positioning etc many times within an asp page? I am using VB in VS2005
by: ebrandmark | last post by:
I have an interesting issue in Safari where I have a DIV and inside that DIV I have an IFRAME. If I do a hide or show of the DIV using dv.style.display="none" or dv.style.display="block" with dv being the DIV Object itself it reloads the IFRAME and I now end up with the content of the IFRAME twice within the DIV (one under the next). This code works fine in IE 6 and 7, Firefox, Netscape 8/9 and even on Firefox on the Mac. Anyone have...
by: vvcortazar | last post by:
I'm having a problem with some javascript buttons on firefox and safari, the code that is executed is the following: <tr> <td class="subtitulosAzul"> ESTADO DE CUENTA </td> </tr> ...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.