15,121 Topics

Member Avatar for
Member Avatar for daitken

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 …

Member Avatar for daitken
0
285
Member Avatar for khanrock

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" /> …

Member Avatar for partha.asp
0
181
Member Avatar for lena1990
0
44
Member Avatar for cartergarth

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.

Member Avatar for pritaeas
0
182
Member Avatar for Cupidvogel

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, …

Member Avatar for Airshow
0
85
Member Avatar for ayushsocial

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 …

Member Avatar for ayushsocial
0
194
Member Avatar for trickist17

[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' …

Member Avatar for trickist17
0
201
Member Avatar for chandub

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.

Member Avatar for Troy III
0
95
Member Avatar for Cupidvogel

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. …

Member Avatar for stbuchok
0
3K
Member Avatar for edu_3dw4rd

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 …

0
128
Member Avatar for h2so4_2003

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 …

Member Avatar for pritaeas
0
94
Member Avatar for dips255

I need a script to generate a popup when page loads with background disabled. Please help

Member Avatar for zeeshan88
0
3K
Member Avatar for Waldema

[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 …

Member Avatar for lps
0
140
Member Avatar for dschuett

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: …

Member Avatar for dschuett
0
102
Member Avatar for Surfsup

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 …

Member Avatar for Surfsup
0
336
Member Avatar for piotrekw

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: " + …

Member Avatar for piotrekw
0
249
Member Avatar for westerdaled

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 …

0
51
Member Avatar for cartergarth

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.

Member Avatar for pritaeas
0
89
Member Avatar for Bubbleboy

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 …

Member Avatar for lps
0
104
Member Avatar for leo88

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 …

0
73
Member Avatar for essaydoctor

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 …

0
61
Member Avatar for riadh13

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 …

Member Avatar for riadh13
0
126
Member Avatar for weblion

[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]

-3
43
Member Avatar for piotrekw

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 …

Member Avatar for piotrekw
0
134
Member Avatar for UrbanCondor

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 …

Member Avatar for Airshow
0
137
Member Avatar for Punny

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 …

Member Avatar for iamthwee
0
104
Member Avatar for softDeveloper

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, …

0
68
Member Avatar for awesomest

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 …

Member Avatar for jawanda0
0
65
Member Avatar for Sorcher

Hello i am trying to make my Ajax fetch the right <input button value. The <button is generated by PHP and will look like this. [CODE] <input type="button" value="Private" id="txtCustomerId" onclick="requestAlbumInfo()"/> <input type="button" value="Public" id="txtCustomerId" onclick="requestAlbumInfo()"/> <input type="button" value="Nature" id="txtCustomerId" onclick="requestAlbumInfo()"/>[/CODE] My Ajax needs to fetch the value="" and send …

Member Avatar for Sorcher
0
116
Member Avatar for ShinyEdge

Hi, I have a problem with jquery callback. The callback is executed before the fadeIn animation is completed. What im trying to do is, I want to replace an existing image with a new image and resize the new image to a specific size. [CODE] var filepath = "images/test.jpg"; $('#imagewrap').css('background-image', …

Member Avatar for ShinyEdge
0
219

The End.