HTML - Define Width And Height For Java Script Code
dear guys:
i have a javascript code which shows 10 recent post of my blog by RSS, there is a advertise of that site at the bottom of it, some friend told me to add : <div> tags to it and define width and height for it and for the height change the number until the ad disappears... also he told me to put the flow on "hidden" but i don't understand much can u help me out? here is an example: Code: <script type='text/javascript' src='http://rssReader.com/code.php?t=1&back=_fff&color=_444&box=_fff&max=10&rss=http://sokkan.ir/post/rss/' ></script> Similar TutorialsSo i just added some google adsense floating ads to my website. They looked pretty nice where they were BUT when i tried it in a thin screen, it falls. So how do I define the border of when the horizonal scrollers appear? BTW: the site where I need to define width is http://akkeonline.com Thanks in advance, AkkeDaBest How to create explorer like menu in Html or java script? eg + Game(inside this Cricket and Football) when click on + sign it become like-- - Game -Cricket -Football Can anybody suggest me, by which command I can do it? Commercial Removals || Removals and Storage||Specialist Removals Hi Just wondering if there is a non -java way of detecting a user's browser width and then redirecting to the appropriate version of my site? Cheers Shaun Hello, If I measure height and width in % instead of pixels then it does not work in firefox. It only ends up displaying only small region of iframe instead of specified size. But this works perfectly fine on IE. Below is the code. <iframe id="theFrame" name="iframes" src="http://www.abc.org" align="top" height="94%" width="96%"></iframe> Thanks, Ruchir Hi. Is it wrong to exceed the width or height of a <div>, or any other tag? For instance, I've got a <div>, which I set to 50px. Now this is more then I need, because it's only 1 line of text, but I'm using a background image with 50px in height in the <p> tag inside the <div> tag. However, I don't want the <div> tag to be 50px, only 25px. It's complicated to explain why I need it like this, and I probably haven't done it correctly, but my question is: is it okay for the contents inside a <div> tag to be wider/higher then the actual <div> tag? Thank you ;D It seems to me all the browsers have no problems to display an image if (width & height) parameters are missing. What is the purpose of using (width & height)? Does it make website working faster? Thanks I have a background image written like (<div style="background-image:url(gbackground.gif); width:100%; height:100%). the problem is that only the right side of the image stretches to fill out the right side of the browser window. as seen here only the right grey column stretches to fill out the browser window, while the left side stays at its original width. in the image the columns are equal width. any way i can fix this? thx. I can't have IE space my cols/row as expected: I want that my cols/rows have an exact width/height, with the final col/row take the remaining space of the table (which I don't know exactly). This works well with Chrome and FF, but IE keeps spreading my cols/rows along the whole space as if the dimentsions I defined were minimum dimensions as opposed to exact dimensions. eg: HTML Code: <table><tr> <td width="100">100 desired</td> <td width="100">100 desired</td> <td>remaining space</td> </tr></table> any help? Hi everyone, How can I set a fixed width and height for the whole frameset: Code: <html> <frameset cols="25%,50%,25%"> <frame src="http://www.w3schools.com/html/frame_a.htm"> <frame src="http://www.w3schools.com/html/frame_b.htm"> <frame src="http://www.w3schools.com/html/frame_c.htm"> </frameset> </html> I'd like the frameset to be just 400 x 200 px. But when I insert the above code it covers my whole webpage. Also I'd like to put a border around the frameset. Your help is really appreciated! Regards Rain Lover hello Every can any one tellme How can i make a webpage open in Fixed height and Width which is to be opened by a Hyperlink Example : like when you click On MORE link From The Smilies in this Forum it open a Small Window Resizeble Window I don't know if this question is posted somewhere, but I can't seem to find the answer I'm looking for. I'm currently using iframe for my posting entries, and I can't figure out the script for auto height. I'm tired of setting the height by hand, every time my entries starts to stretch. Now regarding the width, would that be possible too? if not, I'm not too concerned. Most important is the height. If anyone have the answers to this please reply. Thanks in advance! (: Hi All, Im just wondering what the standard Width and Height is for a website nowadays? Thanks in Advance Hey folks, I have been looking all over the web for hours looking for the script that potspace.com uses that cool little warning thing. No I do not use potspace.com Some one told me about their pop up notifier thing and I want it for my site however It's just a regular site. I want to use that for Website Alerts. =) I really want that script If some one could please just visit potspace.com as soon as they get to the site a div will pop up I like that it's really cool can some one please get me the script that does that. I thought I made it but I didn't it just stayed on the page 24/7 LOL it didn't have that re'direct back to the page button. Also It only shows up one time per a session.!! I've got another problem with my website. I've taken a screenshot that I wanted for my website background. But since it was took on my screen, it doesn't fill the screen on wider monitors. I'm just wondering if there's any information on auto-resizing a website background. Or is it a scirpt/CSS/php style thing? This problem seems abit more complex than me previous problem. I'm on a 19 inch monitor. Here is my website for those that have bigger screens than me. http://www.dawncraftmc.com/ I am having trouble trying to create a table that each table cell changes colour on mouseover and mouseout. I have posted my codes so far where I have managed to change the cursor on mouseover and mouseout. Any help would be most appreciated. This is table.html Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <script type="text/javascript" src="/Tests/table.js"></script> </head> <body> test table <table border="1" class="pictures" style="margin-left: 300px" width="300px"> <tr > <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>1</p></td> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>2</p></td> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>3</p></td> </tr> <tr> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>4</p></td> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>5</p></td> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>6</p></td> </tr> <tr> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>7</p></td> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>8</p></td> <td onmouseover="cursor_hand()" onmouseout="cursor_clear()"><p>9</p></td> </tr> </table> </body> </html> This is table.js Code: function cursor_hand(){ document.body.style.cursor = 'pointer'; } function cursor_clear() { document.body.style.cursor = 'default'; } How can I run HTML from Javascript? What I mean is that from etc. index.html I will load a file.js script, which will include the whole HTML. Not sure if I can explain myself correctly, do you know what I mean? Which you think i should go with if I am using drop down menus for my site? CSS dropdown or Java? There is a lot of nifty programs out there that generate this dropdown menu for you, but what are the disadvantages? Should I create using CSS in the page itself, which seems more difficult to do and more time consuming... Hi, i am creating a web page dynamically through ajax like this here i am creating a td element and appending a button element to it Code: var td5= document.createElement("TD"); td5.style.whiteSpace = "nowrap"; td5.setAttribute("id", "button" + hostname); var button=document.createElement("input"); button.setAttribute("type", "button"); button.setAttribute("id", "updatebutton" + hostname); button.setAttribute("value", "Click here"); button.setAttribute("onclick", "alert('OK')"); td5.appendChild(button); it appearing good on web page the but when i click the button, where i am not getting supposed alert Code: button.setAttribute("onclick", "alert('OK')"); line is not showing effect and when i try like this Code: button.onclick=new Function (alert('hi')); when my IE loads the page i am getting alert where as , alert must come after clicking the button any work around please Thanks R On http://www.thomasmckee.com/scroller.html, how can I align the image of the car to the left of the scroller with no spacing between them and the total size be 960w by 150h? I mean, how do I butt them next to each other? If you can, will you email your answer to thomas@thomasmckee.com? Hello, I got a program, but I am unable to execute it, the addition of two variables is not executing in the output, I am unable to find the mistake in the program, plz any one find it and let me know the mistake.. Here is the Program ***************************** <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <script type="text/javascript"> var firstnum,secondnum,num1,num2,sum; fistnum = window.prompt("enter the first number","0"); secondnum = window.prompt("enter the second number","0"); num1 = parseint( firstnum ); num2 = parseint( secondnum ); sum = num1 + num2; document.writeln("<h1> the sum is "+ sum + "</h1>"); </script> <body> <p> Click Refresh (or Reload) to Run the script once again </p> <!-- <input name="submit" type="button" onclick="document.writeln();"--> </body> </html> *********************** |