247 Posted Topics
Re: You use an if statement: [CODE]<script type="text/javascript"> function test() { t = document.getElementById("p123"); w = t.width; h = t.height; if (w > 300){ // do something here } } </script>[/CODE] I am not sure what you mean by bottom line must show, if you are talking about the words "TEST" … | |
Re: Why dont you just send the name of the element or id of the element in to the onchange function, send the element using "this", so the function call could be something like this : [CODE]... onchange="callMe('elementId')"[/CODE] or [CODE]... onchange="callMe(this)"[/CODE] Then inside the callMe function u will then have the … | |
Re: Have you used firebug with Firefox, cause i get an error in FF [B]first error:[/B] cannot access optimized closure function v(){var a=document.getElementsB...t(a)}}w(window,navigator,document);})()\n [B]second error:[/B] GET [url]http://www.dealpigeon.com/dm/image/imagelist.php?id=12[/url] 404 Not Found | |
Re: Nope, Ajax is client side, so no need to do any server side configurations. | |
Re: You weren't really calling the function, it starts running when the page loaded. I see that you are changing the href attribute to a hash inside the loop, so i modified your code to look like this: [CODE]<html> <body> <form> <a onclick="change(this)" id="static" href="#">link1</a></br> <a onclick="change(this)" id="static" href="#">link2</a></br> <input type="text" … | |
Re: when i first loaded this code into firefox it gave an error, then i changed this line: [CODE]# function addit = function()[/CODE] to this: [CODE]# function addit ()[/CODE] and it works in both FF 3.5 and IE 8 | |
Re: I have never used the toplink program but to me it seems as though it just "creates" the sql statements for you. Regarding mysql and oracle, they both require different drivers, other than that it should be ok to use the same code | |
Re: Google provides loads of links to examples online. Try this one [URL="http://www.oracle.com/technology/pub/articles/cioroianu_jsfdb.html"]here[/URL] | |
Re: what you could do is preload the image and set its visibility to be hidden, then on the onclick event of the checkbox, you can just set the image to be visible. OR you can have a div next to the checkbox, then on the onclick even just change the … | |
Re: u have to change the innerhtml of td tag. so the onmousover event will look something like this: [CODE]onmouseover = "document.getElementById('tdId').innerhtml='<img src='imgname.jpg'>' "[/CODE] | |
Re: some code will be really useful. I am guessing that in the class your are most likely sending the entire file. | |
Re: If the information has been posted to the servlet, using request.getParameter will display the information passed. You would use it something like this: [CODE]request.getParameter("firstname")[/CODE] | |
Re: Go [URL="http://www.w3schools.com/Ajax/ajax_example.asp"]here[/URL] | |
Re: Seems CSS3 has a marquee property, click [URL="http://www.w3.org/TR/css3-box/#marquee"]here[/URL] I know that a marquee can be done using javascript, so check [URL="http://www.google.com/#hl=en&q=marquee+using+javascript+and+css&meta=&aq=&oq=&fp=1&cad=b"]these[/URL] out too | |
Re: I dont think you can do that, you are going to need a server side language, like ASP, Java, PHP etc that will be able to communicate with the database. | |
Re: [QUOTE=dmmajorstudent;1036164]hello, i'm a student trying create a website using javascript. i am not familiar with javascript and i must use it to change only the content on my page. i have been stuck on this for days and i just cannot get it right. [/QUOTE] a good place to learn … | |
Re: You could do a check on the value something like[CODE]if (tBox.value != ""){//proceed to next question}else{alert("Please enter a value in the textbox")}[/CODE] | |
Re: Without being able to see your code, all i can say is that u can do a comparison on the value returned by responseText, something like [CODE]if (responseText == "no"){ //do something}else{//do something else}[/CODE] | |
Re: I am not sure sure if this will help, but i had done something a similar, what i did is create a json string using javascript on my jsp page after button was clicked, then sent the json string using ajax to a servlet. In the servlet i used request.getParameter … | |
Re: You are going to need a server side language to connect to the database, Peter_budo has written a nice tutorial [URL="http://www.daniweb.com/forums/thread141776.html"]here[/URL] | |
| |
Re: Ensure that your virtual directory that the anonymous access is Checked. Also check this [URL="http://support.microsoft.com/default.aspx?scid=kb;EN-US;259725"]page[/URL] | |
Re: I haven't had the need to write one, but there are loads of examples online, using google i came across this [URL="http://www.melfam.com/javamarqmess.html"]one [/URL] | |
Re: [CODE]use DATABASE_NAME SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES[/CODE] | |
Re: You can go [URL="http://www.w3schools.com/Ajax/ajax_example.asp"]here[/URL] and learn about AJAX, that will help you with what you are intending to do. | |
Re: can you please provide some code, it would make it easier to help you. | |
Re: By numeric validation do u just want to validate that numeric characters were entered in the form? | |
Re: They will show the same name because you can only hard code one element id, what u can do is this: [CODE]onmouseover=fu(this)[/CODE] then in the javascript function change it to this: [CODE]function fu(el){ alert(el.name); }[/CODE] by sending in the this property u are sending the element object to teh function … | |
Re: To display a bigger image you can use teh width and height attributes of the img tag, just as you have done in the code presented. to change the display to more than 12, in the code that gets the records from the database must be limiting it to 12. … | |
Re: do a google search for "javascript example autocomplete" loads of examples are then available | |
Re: You run javascript in a browser, u can include it inside the html file or link it to the html file by calling the javascript file (yes the name should be filename.js) (filename being whatever name you want to call it.) the best place to find the basics about javascript … | |
Re: I think you should add the javascript provided to a function then call the function using the body onload event, it will then work. | |
Re: I tested the code provided, and mine works correctly. Could you provide your code, maybe something is missing. | |
Re: You almost had it, just teh slashes have to be backward slashes so link should look something like this: \\servername\fioldername\filename.blah | |
Re: I see that your original problem [URL="http://www.daniweb.com/forums/thread229724.html"]http://www.daniweb.com/forums/thread229724.html[/URL] has been solved please mark that as solved so that people dont answer a thread that has already been solved. Now onto your new problem, the code that is causing your page to open in a new window on page3.html is this: [CODE]<a … | |
Re: when using teh insert statement, the fields that do allow nulls have to be listed in teh statement, with teh correspoding values. So if all the fields in the db were designed to accept a value, then they have to be listed in the statement. They do not have to … | |
Re: I dont know anything about tripod/lycos but from the code you have provided, in order to change where the page goes to after submission, you are going to have to edit the file referred to in teh action atttribute. As to why the submit button is greyed out, unfortunately nothing … | |
Re: Try increasing the size of the textbox by using the width attribute. [CODE]<input type="text" style="width:250px" name="tBox1" /> [/CODE] | |
Re: Is everything on the new server set up the same way as it was on the old server? Maybe the access rights are set to Anonymous on IIS | |
Re: You are using a stylesheet, which i presume should be the same for all teh pages. I dont see how it can be looking different. Would it be possible to paste the code for teh two pages that are looking different. | |
Re: Can you provide some code please, it will make it easier to be able to help | |
Re: Please read the rules of this forum [URL="http://www.daniweb.com/forums/faq.php?faq=daniweb_policies"]here[/URL] You need to ask a specific question with regard to an error that you are getting, otherwise no one is going to help you. If you need to learn html, [URL="http://www.w3schools.com/html/default.asp"]w3schools[/URL] is a good place to start | |
Re: The href attributes are causing it to open in a new window, you can remove them [CODE]<a onClick="sendRequest('home.html');">Home</a>[/CODE] | |
Re: [QUOTE=cuzner;1008489] I have tried many times and just do not know if it is possible to access the index page's ajax code from the div content. [/QUOTE] Yes it is possible, if your script is on the index page, it is also available to the new html that has just … | |
Re: You have to do some work on your own first, start coding something, and when you get an error come back to ask how to solve the error. No one is just going to give you the answer. | |
Re: I was just wondering why do you compare the username, password and role entered by the user by selecting all the records in the database? I think it would be easier if you just select the record pertaining to the user that has logged in. So you just select the … | |
Re: Learn more about Ajax [URL="http://www.w3schools.com/Ajax/Default.Asp"]here[/URL] then implement the function on the onclick events of your menu. | |
Re: Try using the colspan parameter, this merges the columns. | |
Re: Thanx. Although it doesnt give the top 10, they are still looking to compile a list of the top 10 |
The End.