Click here to Skip to main content
15,895,667 members
Home / Discussions / Web Development
   

Web Development

 
QuestionTricky!!! Layoutproblem with JS generated select element Pin
Stephan Pilz20-Aug-06 23:24
Stephan Pilz20-Aug-06 23:24 
AnswerRe: Tricky!!! Layoutproblem with JS generated select element Pin
Guffa21-Aug-06 0:23
Guffa21-Aug-06 0:23 
GeneralRe: Tricky!!! Layoutproblem with JS generated select element Pin
Stephan Pilz21-Aug-06 0:28
Stephan Pilz21-Aug-06 0:28 
GeneralRe: Tricky!!! Layoutproblem with JS generated select element Pin
Stephan Pilz21-Aug-06 1:48
Stephan Pilz21-Aug-06 1:48 
AnswerRe: Tricky!!! Layoutproblem with JS generated select element Pin
Paddy Boyd21-Aug-06 3:46
Paddy Boyd21-Aug-06 3:46 
GeneralRe: Tricky!!! Layoutproblem with JS generated select element Pin
Stephan Pilz22-Aug-06 2:16
Stephan Pilz22-Aug-06 2:16 
QuestionJavaScript Pin
peshawarcoder20-Aug-06 23:11
peshawarcoder20-Aug-06 23:11 
AnswerRe: JavaScript Pin
User 171649221-Aug-06 5:15
professionalUser 171649221-Aug-06 5:15 
There are many solutions but here is one that might do the trick ...

// This section checks to see if the browser is IE4 or higher<br />
 var RunningIE4<br />
RunningIE4 = (msieversion() >=4);<br />
function msieversion() {<br />
	var ua = window.navigator.userAgent<br />
	var msie = ua.indexOf ( "MSIE " )<br />
	if ( msie > 0 )		// is Microsoft Internet Explorer; return version number<br />
		return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )<br />
	else<br />
		return 0	// is other browser<br />
}<br />
<br />
var curBanner<br />
curBanner = 0<br />
Bfiles   = new Array()  // image file names<br />
Btargets = new Array()  // hyperlink targets<br />
Balt = new Array()  // alt display<br />
Bfiles[0] = "ad1.swf"<br />
Btargets[0] = "http://www.the web address"<br />
Balt[0] = " description - can be blank"<br />
Bfiles[1] = "ad2.swf"<br />
Btargets[1] = "http://www.the web address"<br />
Balt[1] = " description - can be blank "<br />
Bfiles[2] = "ad3.swf"<br />
Btargets[2] = "http://www.the web address"<br />
Balt[2] = " description - can be blank"<br />
<br />
function startBanner() {<br />
window.setInterval("changeBanner();",60000);<br />
}<br />
 function changeBanner() {<br />
if (RunningIE4 == true) {<br />
    if (curBanner == (Bfiles.length -1)) {<br />
       curBanner = 0;<br />
    } else {<br />
       curBanner++}<br />
    Banner.src   = Bfiles[curBanner]<br />
    BannerTag.href  = Btargets[curBanner]<br />
    Banner.alt  = Balt[curBanner]<br />
    }<br />
    } <br />

and later in the web page
<br />
<SCRIPT LANGUAGE="JavaScript"><br />
if (RunningIE4 == true) {<br />
document.write("<A NAME='BannerTag' HREF='" +Btargets[curBanner]+ "' TARGET='_new'><IMG NAME='Banner' BORDER=0 SRC='" +Bfiles[curBanner]+"' ALT='"+Balt[curBanner]+"'  ></A>")<br />
}<br />
</SCRIPT><br />
<NOSCRIPT> <A HREF="non-ie webpage.htm">for non MSIE browsers</A> </NOSCRIPT>


modified 1-Aug-19 21:02pm.

GeneralRe: JavaScript Pin
peshawarcoder21-Aug-06 21:08
peshawarcoder21-Aug-06 21:08 
Questionhow to delete the particular row in datagrid Pin
kdarun20-Aug-06 22:45
kdarun20-Aug-06 22:45 
AnswerRe: how to delete the particular row in datagrid Pin
_AK_21-Aug-06 18:58
_AK_21-Aug-06 18:58 
Questionjava script file search Pin
baliramvyas200020-Aug-06 19:38
baliramvyas200020-Aug-06 19:38 
Questionversion control implementation for unversioned files Pin
hiraljv20-Aug-06 18:54
hiraljv20-Aug-06 18:54 
Question[urgent] [php] arrays [modified] Pin
Sam 200620-Aug-06 18:50
Sam 200620-Aug-06 18:50 
AnswerRe: [urgent] [php] arrays Pin
Guffa20-Aug-06 21:34
Guffa20-Aug-06 21:34 
Questionwindow.open function acting strange Pin
Paul Ferris20-Aug-06 12:29
Paul Ferris20-Aug-06 12:29 
GeneralRe: window.open function acting strange Pin
Boro_Bob20-Aug-06 13:22
Boro_Bob20-Aug-06 13:22 
GeneralRe: window.open function acting strange Pin
Paul Ferris20-Aug-06 20:39
Paul Ferris20-Aug-06 20:39 
GeneralRe: window.open function acting strange Pin
Guffa20-Aug-06 21:36
Guffa20-Aug-06 21:36 
GeneralRe: window.open function acting strange Pin
Paul Ferris22-Aug-06 0:57
Paul Ferris22-Aug-06 0:57 
AnswerRe: window.open function acting strange Pin
Guffa22-Aug-06 8:55
Guffa22-Aug-06 8:55 
Question[need help] mysql question [modified] Pin
Sam 200620-Aug-06 4:09
Sam 200620-Aug-06 4:09 
AnswerRe: [need help] mysql question Pin
Guffa20-Aug-06 4:42
Guffa20-Aug-06 4:42 
GeneralRe: [need help] mysql question Pin
Sam 200620-Aug-06 4:48
Sam 200620-Aug-06 4:48 
QuestionThree column layout without tables Pin
gantww19-Aug-06 18:12
gantww19-Aug-06 18:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.