im totally lost lol even i already losted coz i suck at coding i add screenshots 1- thats lookin of the last code of yours with firefox1.0.6 and ie 6 ( they same ) 2- your test.html how looks in firefox1.0.6 3- your test.html how looks in ie 6
That looks pretty much as I expected it to look Firefox wraps the links, but that can easily be fixed by adding a width attribute to the div. The question is: is that the way you want it to look and behave, or is there something I missed?
lol it works well on your test.html page but not at my site here is what i have at least so may be you see what im doing wrong <SCRIPT language=javascript> <!-- function initialize() { this.name = "yahoo_games_home"; } function lobbyopen(name) { var res = document.resolution.res; var small; if (res.value == "small") { dms = "height=425,width=620,"; small = "&small=yes"; } else { dms = "height=520,width=786,"; small = ""; } window.open("http://games.yahoo.com/games/ante?room="+name+"&prof_id="+"chat_pf_1", name, "top=2,left=2,"+dms+",toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1"); return false; } initialize(); --> </SCRIPT> <?php echo" <div style=\"overflow:auto;height:90px;width:400px\"> <a href=\"#here\" onclick='return lobbyopen(\"pool_105\");'>Achilles Last Stand</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_19_r\");'>Afraid to Lose</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_d\");'>Alien</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_7\");'>Alive</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_h\");'>Alive And Kicking</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_1\");'>All Right Now</a><br> </div> "; ?> Code (markup): * i keep jawa out of my php tags coz i have a script which works like that * i removed some code parts coz it is about php nuke * at your example all boxes shows 13 lines where do i setup it for show 5 or may be 7 lines * also is that possible i dont have a scroll bar under combo box thank you for been patiance to me appreciated
The javascript fails because it tries to access a form named "resolution" which decides what size popup will be used. Just insert the following code anywhere in the body element and I'm sure it will work. <form name=resolution action="http://play.yahoo.com/games/" method=post> <select name=res> <option value="large" selected>Large 800X600</option> <option value="small">Small 640x480</option> </select> </form> Code (markup): You can change the "height:90px" part in the div. Just experiment with different pixel values, like 50px, and I'm sure you'll get a hang of it I take it you mean the horizontal scrollbar. Try different values for the "width:400px", it works the same way as the height. No problem at all... Glad I can help
man im gonna crash the screen in a min i have this now ( deleted jawascript ) see the attacment file how it looks plz echo" <form name=resolution action=\"http://play.yahoo.com/games\" method=post> <select name=res> <option value=\"large\" selected>Large 800X600</option> <option value=\"small\">Small 640x480</option> </select> </form> <div style=\"overflow:auto;height:90px;width:400px\"> <a href=\"#here\" onclick='return lobbyopen(\"pool_105\");'>Achilles Last Stand</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_19_r\");'>Afraid to Lose</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_d\");'>Alien</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_7\");'>Alive</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_h\");'>Alive And Kicking</a><br> <a href=\"#here\" onclick='return lobbyopen(\"pool_51_1\");'>All Right Now</a><br> </div> "; Code (markup):
ok i copied all the test.html to my page and cleaning the code looks like i can do it i will let you know how it went coz its 4.25 am here ty
No worries, you'll get it working Forget what I said before about the form. Lets study the fully working example PHP file I attached to this post. I made the code a bit more readable, but it still does the some thing as before. I'll try to break the code into pieces so that it's easier to understand why all the elements are needed. Javascript part: var name = "yahoo_games_home"; function lobbyopen(name) { var res = "small"; /* Uncomment this if the users need to be able to change the resolution */ // var res = document.resolution.res; if (res.value == "small") { dms = "height=425,width=620,"; } else { dms = "height=520,width=786,"; } window.open("http://games.yahoo.com/games/ante?room=" + name + "&prof_id="+"chat_pf_1", name, "top=2,left=2," + dms + ",toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1"); return false; } Code (markup): The javascript is responsible for opening the popup windows. The popup windows won't open if this code is removed. var name = "yahoo_games_home"; Code (markup): This part tells the popup opener which game room to open. function lobbyopen(name) { Code (markup): The lobbyopen function is called everytime a link is clicked. It takes care of actually opening the popup. var res = "small"; Code (markup): This just tells that we want a smaller popup. Change the "small" part to anything else, i.e. "big", if you'd prefer a bigger one. window.open("http://games.yahoo.com/games/ante?room=" + name + "&prof_id="+"chat_pf_1", name, "top=2,left=2," + dms + ",toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=0,resizable=1"); Code (markup): This is finally the code that defines the popup window, gives it some default values and opens it. You don't need to worry about this part in detail, but if you're interested in what all that text does, you could try searching google for "window.open javascript". The HTML code: <div style="overflow:auto;height:90px;width:400px"> <a href="#here" onclick='return lobbyopen("pool_105");'>Achilles Last Stand</a><br> <a href="#here" onclick='return lobbyopen("pool_19_r");'>Afraid to Lose</a><br> <a href="#here" onclick='return lobbyopen("pool_51_d");'>Alien</a><br> <a href="#here" onclick='return lobbyopen("pool_51_7");'>Alive</a><br> <a href="#here" onclick='return lobbyopen("pool_51_h");'>Alive And Kicking</a><br> <a href="#here" onclick='return lobbyopen("pool_51_1");'>All Right Now</a><br> </div> Code (markup): This wraps all the links that you want in a scrollable div. The lobbyopen javascript function is being called everytime a link is pressed. That's why the links don't work if the javascript is missing. <div style="overflow:auto;height:90px;width:400px"> Code (markup): The height and width define the size of the div. Scrollbars become visible if the text doesn't fit into the div.
Macbert Your da Man tested with ie and fireworks and thats what i want, now i can play with it with my superior coding knowledge and show you the results thank you very very very much for been patience i also want to thanks all the members who tryed to help me at this thread