15,688 Topics
![]() | |
OK! I gave it away in the title. . What I have is a java script that is the floating top menu for the site. Instead of putting all that code on each page I want to have it on one page and just use a little code to import … | |
I am currently having a html code as: <form> <input type="text" name="price1" size="14" value="Rs.900" readonly="readonly"/> <input type="text" name="price2" size="14" value="Rs.600" readonly="readonly"/> <input type="text" name="price3" size="14" value="Rs.500" readonly="readonly"/> </form> <form name="qty"> <input type="text" name="quant1" id="id1" size="14" value="0"/> <input type="text" name="quant2" id="id2" size="14" value="0" /> <input type="text" name="quant3" id="id3" size="14" value="0" /> … | |
I did something like this: [CODE]$('#test').append("<option id='ddm'>added dropdown</option>");[/CODE] it shows its html in the browser but I can't see it when I view source, is this normal? Thanks. | |
Well, the following code is giving me unexpected result. [code] a = setTimeout(function() { alert('fuck'); },9000); b = setTimeout(function() { console.log(a); },3000); [/code] Here I expect that after 3 seconds, the then-value of [b]a[/b] will be printed ([b]a[/b] should be changing its value right from page-load). However, on running it, … | |
Hello guys and gals I have created a banner for my client. It's a image banner not flash, with common html coding Eg <a href="http://www.mysite.com"><img src="http://www.mysite.com/banners/2-12/160x600_5.jpg" width=160 height=600 border=1 ALT="Click to Visit"></a> Now my client gave me an URL, which is a tracking code of some affiliate network. I need … | |
[CODE] /*the ø stands for document.getElementById*/ function conwidth(){ var a=document.getElementsByClassName('dropdown'); var e=[]; for(i=0;i<=a.length;i++){ if(a[i].innerHTML.length>28){ /*Safari Error (only if I bypass the setwid(j,k)command): TypeError: 'undefined' is not an object (evaluating 'a[i].innerHTML')*/ e.push(a[i].innerHTML); var j=ø(a[i].parentNode.id).parentNode.id; var k=200+8*(a[i].innerHTML.length-28); setwid(j,k); } } } function setwid(b,c){ var dr=document.getElementsByClassName('dropdown');var st=document.getElementsByClassName('strich');var a=function(a){return ø(a.parentNode.id).parentNode.id;}; /*Safari Error: TypeError: 'undefined' … | |
hai everybody am using following code to preview the image before uploading it. but am unable to display the image please help me. [code=html]<SCRIPT type="text/javascript"> function preview(what){ document.getElementById("previewField").src=what.value; } </SCRIPT> <INPUT type="file" id="picField" onchange="preview(this)"> <IMG id="previewField" alt="Preview">[/code] thank you. | |
Hi, if I run something like this to popup an alert 2 seconds after page-load, the alert pops up instantly: [code] <html> <head> <script type="text/javascript"> setTimeout(alert('Was it worth the wait?'), 5000); </script> </head> <body> <p>Hi!</p> </body> </html> [/code] whereas if I double-quote the alert function, it is functioning as usual. … ![]() | |
Hi everyone, My name is Edward and I have question about AJAX, JSON, and google geocode. I have an assignment to create a webpage that has following text fields: name, street address, zip code, city, and state. The goal of this assignment is that when I fill the zip code-text … | |
I used the method for action=edit to pass the value in hidden way to required page. function editRecord(val) { document.getElementById("action")=val; document.actionEdit.submit(); } <table> <tr> <td><a href='abc.php?cno=<?php echo $data[$i]["no"]; ?>' onclick='return editRecord("edit")' > Number </a> </td> </tr> </table> <form name="actionEdit" id="actionEdit" action="./abc.php?page=xyz" method="post"> <input type="hidden" name="action" id="action" /> </form> It doesn't … | |
I need a script to generate a popup when page loads with background disabled. Please help | |
[CODE]<?php require_once('auth.php'); define('DB_HOST', 'xxx'); define('DB_USER', 'xxx'); define('DB_PASSWORD', 'xxx'); define('DB_DATABASE', 'xxx'); $connection = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); if(!$connection) { die('Connection error: ' . mysql_error()); } $selectdb= mysql_select_db(DB_DATABASE); if(!$selectdb) { die('Unable to select database: ' . mysql_error()); } ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>xxx</title> <link rel="stylesheet" href="xxx.css"> <head> </head> <body> <div … | |
I am trying to archive a database entry using .post, but I am getting this error: "Uncaught SyntaxError: Unexpected token (" I am defintely still in the learning phase of jQuery, so any help is appreciated! [CODE] //Archive Table Row function archiveEntry(id){ function(){ if (confirm("Archive Fill #"+id+"?")) { $.post('/elevator/scripts/php-inc/archive.php', {id: … | |
I have a simple script (below) that on click (to the element with an id of #addClass) adds a class (.switcher) to the body tag. The script uses jquery. I would like to know if it's possible to modify this script so that when the user moves on to the … | |
Hi, I would do result loop where the only exists title attribute and how to make the result of the title attribute? This code does not work: [CODE]<html> <head> <script type="text/javascript"> function ppp() { var i=0; for(i=0;i<9;i++) { var idm='a' + i; var AttributeA=document.getElementById(idm).getAttributeNode("title"); if (AttributeA) { document.write("number: " + … | |
Hi I wanted to add some some date comparison functions to some xslt. I thought since I have a custom myjs.js library loaded with a DoDebug function that simply returns a boolean True I could use the following but I get an "Unknown XSLT function Error". Is there a way … | |
What is the naming convention for jquery? [url]http://net.tutsplus.com/articles/news/learn-how-to-create-a-jquery-plugin/[/url] says [CODE][B]funcName/jQuery.js[/B] [/CODE] while... [url]http://www.ok-cool.com/posts/read/19-jquery-for-programmers-part-1/[/url] says [CODE][B]jQuery.funcName.js[/B][/CODE] Thanks. | |
I have a set of PDF files on our website that the user needs to log in in order to view. The only problem is once they log in and get the URL for them, they can email it to their friends or anyone and they can be viewed by … | |
Hi, I wants to ask how to pending the coding in code behind before the javascript function is finished execute? for example: [CODE] ScriptManager.RegisterStartupScript(Me, Me.GetType(), Guid.NewGuid().ToString(), "initCard('" & 28 & "');" & Page.ClientScript.GetPostBackEventReference(Me, ""), True) Me.Response.Redirect("~/MasterData/StaffMaintain.aspx", False) [/CODE] From the coding above, I call a javascript function of "initcard()",before redirect … | |
I am creating a nifty site using an online website developer called yola.com. I'm adding some HTML coding that I'm putting together. I'm trying to create a "nested pulldown": When a user pulls down the first menu which lists the 50 states of the USA, the second pull down menu … | |
please i need to do a table in a form in wich a customer input his values and operations are calculated automatically (see picture), i am bad in javascript, can anyone help me. [IMG]http://img11.hostingpics.net/pics/920763plan.jpg[/IMG] [url]http://img11.hostingpics.net/pics/920763plan.jpg[/url] the customer input the 5 first values: monthly income, number for the 1st year, the … | |
[TEX]in html java script[/TEX] [CODE]var string = "anystring0001enabled"; alert(string.replace(/\D/g, ""));[/CODE] [TEX]in c#[/TEX] [CODE]string[] numbers = Regex.Split("anystring0001enabled", @"\D+"); foreach (string value in numbers) { if (!string.IsNullOrEmpty(value)) { int i = int.Parse(value); } }[/CODE] | |
Does anyone know what is wrong, that this script in this case, a bad number of days in the difference in dates? The difference should be 2 days - the script shows 1 day. If the difference is in the same month is OK. [CODE]<script type="text/javascript"> var date_from = new … | |
I am using tabbed navigation in my website.I have this code with me.I have used Jquery for fading effect.when I select any tab, I want that tab to be highlighted.but I can't do this. Please help.Thanks in advance. I couldn't attached "tab.css" so I am pasting it here. [CODE]*{ padding: … | |
Hi, I'm new to JQuery/Ajax with PHP. I'm calling a PHP file, and all the code runs well, except for the echo's. The echo's are not showing and they were supposed to be showing . Here are both my files(Which are very simple): (x.php(main file) and sugere.php(the called file)) X.PHP … ![]() | |
Hi all, I'm having a problem with a combination of Ajax / PHP / Javascript and I'm stuck. I've spent a fair amount of time googling possible solutions but I can't find anything. [B][U]What I am trying to do[/U][/B] I am using Ajax to query a MySQL database using an … | |
I just finished reading an e-book 200 pages of tutorials everything about JavaScript it took me three months to get JavaScript understand. Now I'm thinking what to learn now. My goal is to make web-applications with Java inserting the software to JavaScript which I learned ActionScript can also do the … ![]() | |
HI all, I want to get the contents of an iframe with jquery doing this code [CODE] for(var i=0;frames.length;i++){ if(self.parent.frames[i].getSelection().toString()!=""){ var bdy = $(self.parent.frames[i].name).contents().find("body"); alert('iframe:'+ bdy.html()); } } [/CODE] Is there a better way of doing this? My goal is getting the iframes selection create a range, extracting its contents, … | |
hi, I've got a problem and i really need help. this is my code [code] <script> var y= new Date(); y.getFullYear() + '<br />'; alert(y); var year = new Date(); year.setFullYear(prompt('Enter the year','1990'),prompt('Enter the month','1'), prompt('Enter the day','1')); alert(year); var yy = y-year; alert(yy); </script>[/code] i want when a user … |
The End.