HTML - Move Text Up/down On Clicking On Button?
Hi,
I am newbie to HTML , I am trying to move the content in html page up/down on clicking of arrow images. HTML Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Scroll</title> <meta name="Generator" content="EditPlus"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <style type="text/css"> .top{ position: absolute; top:0; right:0; background-image: url('uparrow.png'); background-size: 16px 16px; width: 16px; height: 16px; } .btm{ position: absolute; display:block; background-image: url('downarrow.png'); background-size: 16px 16px; width: 16px; height: 16px; bottom: 0; right: 0; } </style> <script type="text/javascript"> function scrollup(objId){ alert("Scroll UP"); console.log(objId); var a = document.getElementById(objId).style.top; console.log(a); } function scrolldown(objId){ alert("Scroll DOWN"); var b= document.getElementById(objId).style.btm; console.log(objId); console.log(b); } </script> </head> <body> <div id="scrollDiv" style="btm:0px"> This is what i like to say. </div> <div class="top" onclick="scrollup('scrollDiv')"></div> <div class="btm" onclick="scrolldown('scrollDiv')"></div> </body> </html> Can somebody help me in this. Regards, Murali Similar Tutorialsi am dynamically creating a HTML in which i have an <img> tag but when i click on it it is not giving any sound like we normally get. so what could be wrong. any help on this ASAP is very help full i am dynamically creating a HTML in which i have an <img> tag but when i click on it it is not giving any sound like we normally get. so what could be wrong. any help on this ASAP is very help full I need an way to upload a file by clicking a link instead of button(<input type="file" name="somename"/>). This feature has been newly added to GMail, to attached a file we need to click a link. Any ideas or code of how this can be done are needed. Thanks Hi All, I want to change the form action clicking on radio button. I have two radio button. the default action is a1.jsp if I click on update button If I click on second radio button I want to change the form action. I want to redirect to another file (change form action if possible) if I click on second radio button How can I do that ? Thanks please reply soon. Hi All, I want to change the form action clicking on radio button. I have two radio button. the default action is a1.jsp if I click on update button If I click on second radio button I want to change the form action. I want to redirect to another file (change form action if possible) if I click on second radio button How can I do that ? Thanks please reply soon. Using below script after clicking the button it will reload the page and starting the application I want people go to anchor link location after clicking the submit button, for example go to the bottom of the page because the program is in the bottom of the page how to do that guys please help Code: echo '<form action="" id="frm_chat" method="post"><fieldset id="fieldset_chat"><legend>Chat</legend><div>'; echo $err_msg; echo "<label>Nick: </label>".$txt_nick->getHtml()."<br />"; echo "<label>Server: </label>".$ddl_server->getHtml()." or ".$txt_server->getHtml()."<br />"; echo "<label>Channel: </label>".$ddl_channel->getHtml()." or ".$txt_channel->getHtml()."<br />"; echo ' <input type="submit" class="btn" name="btn_chat" value="Chat Now"/></div></fieldset></form>'; My apologies if this belongs in a different forum. I'm creating an order form for a site and I need to add something I've never done before. I want content to be added to the form if the user clicks on a certain radio button. At the bottom of the form there are fields for the subtotal and total of the items that they're inputting at the top of the form. By clicking on a radio button I want to do either of the following. 1) A new table cell appears with text and an input field that has a number already in it. 2) The above cell and content are already on the page, and the clicking of the radio button only adds the info into the empty input. The first option I assume is a little more complicated and probably deals with CSS and/or Javascript. Option 1 is preferred but if I can only do number 2 then I'll deal. Just a note, I'm not doing any actual number calculations with this form. It's just raw numbers so there's no need to take that into consideration. Any and all help will be greatly appreciated. Hi, I'm working on a simple website in which I'm required to use two types of forms input on a webpage. I have decided to make a simple quiz which will be designed as follows; -------------------------------------------------------- Q1: The largest mammal on land is: (radio button choices) Q2: Please tick the two correct answers: (tick boxes, four available... only two correct) ---------------------------------------------------------- (BUTTON: Please click here for the answers) ... answers should appear once the above button is pressed... Answers: Q1: B Q2: A * C Is this possible in HTML? Sounds quite straight-forward but I'm no expert so forgive me.. Ps: Is it possible to design a radio button which, depending on the choice, the related-text will appear underneath on the same page? So if they select 'A' then paragraph 'A' will show, if they select 'C' then paragraph 'C' will appear (with the rest hiding)... Thanks! Hello. I have text at the top right, "A Site for All Nations to Share their Knowledge!" and I need to move it to the left a bit so its not overlapping the sun image. I appreciate You! Hi I have a form which posts back using mailto: method="post" enctype="text/plain" So all the lines in the emial which the form sends look like this: line1= form text line2= more form text line3= more form text is it possible to remove the line1= ? so the email would look like: form text more form text more form text I have removed the name of the form field element as a test on line 1 so it looks like: =form text line2= more form text line3= more form text But you can see it still holds the = Can I get rid of this too? Thanks in adv.. I am trying to move my title text further to the right. However, when I do (by adding more  , the title breaks into another line instead of moving further to the right. I have tried manipulating the margin px, but it isnt changing. I am not familiar with manipulating floating text. How do I accomplish this? Here is my current code: <td align="center" valign="top"><table width="655" border="0" cellspacing="0" cellpadding="0"> <div style="background:url(/offices.jpg);margin:0;"><br/><br/><span style="float:right;margin:0px 150px 198px 0px;"><font type="Arial Narrow" size="5"><b> &nbs p; &n bsp; <font color="#4E4848">My title</font></b></font> </span> Hi, I need a text box with a button which submit this line "http://xxxxxxxxx.com/my/api/sms-http.php?username=xxxx&password=xxxx&code=92&number=03333666252&msg=testingdrfdfdf" Text box is only for edit "testingdrfdfdf" (it sends a sms using API) Who help me? I shell be very thankful to him/her. Thanks in advance : ) Hello! I am trying to create a box (size, height: 3 centimeters width:2 centimeters) with a MODIFIABLE text ("http://www.dayli.com/contentnumber="). That text has to be a URL and below the box a button to GO directly to that URL. Something like the box of http://www.google.com/gwt/x? Can somebody help me? Thank you. Hi all a couple of questions.......... first how do I add text to a colored button that is part of the heading of my website. It is all lined up and when I go to paste the words in the button moves out of range or table. Is there a certain code that I use to prevent this. Secondly how do I make this a rollover text box....Thanks for your help I am new to HTML. I just started yesterday and found it to be useful so far. I am in the process of setting up a website so I searched for a template to use, but it wasn't complete. I think everything is in place except for the 5 page link buttons on the side. Currently they all link to the same site, but I can fix that myself. I need to put text over the image while still allowing the button to be clicked, but I don't know how. I put an image of what I want inside the attached zip file. Thanks in advance. Hi, I need to wrap the text of button so that it fits in the button's fixed width and doesn't expand the button's width, only it's height. This can be done in a regular text using the WORD-BREAK:BREAK-ALL; attribute But I tried this on the button and it's not working? Is there any work around for that? any css attribut? Hello all, I am looking to see if there is a simple way to provide a print button for static Text and/or images within a simple table. The content will not change, so I want to see if I can provide a programmed print button for the content within each table. The application is a FAQ page of a website. Currently, the page is long and printing a particular FAQ item is not possible. Expecting the viewers to be web-savvy enough to know how to print selected text is out of the question, as well as providing them this tip in writing. There needs to be a print button. I found this: http://download.oracle.com/javase/tu...rinttable.html but since I am not familiar with coding much beyond basic html I am not sure if this applies or how to implement the code examples in a webpage. I use Dreamweaver MX '04 to edit page html. Any help would be greatly appreciated. Thank you in advance. Hello there, I am trying to find code to accomplish one little task. I want specific text to show up when one hovers over a button. Not clicking it, but hovering over. Like the ESPN tourny bracket page...hover over any team abbreviation to see full team name. Example Any help would be greatly appreciated. Thanks, Lorne Hi all, I would like to ask for your help here. How can I first have a few radio buttons on my page and when the user select one of those, a text box with a submit button will appear. The text box is for the user to key in some kind of code/password so that it will prompt the user to a url according to the code/password. Example: Code: YAH URL: www.yahoo.com Code: GOO URL: www.google.com And if the user keys the wrong code it will prompt a message box asking them to try again. If the user key the code wrongly for 3 times it will prompt to another url. Ive also attach an example of how it should look like. I would appreciate for your help. Thanks a lot! hi there. i made a website for somebody years ago when i knew nothing about html. the code is absolutely crazily bad and i am looking to revamp it. the site is www.englishandproudofit.co.uk i know how to do the layout but its the buttons i am struggling with. what is the best way to make the buttons around the outside? i only want to use one image for all of the buttons and then have text on each button that also chnages colour on hover, pretty much how it is now but what would be the correct way to do it? all help greatly appreciated. thank you, sam |