15,700 Topics

Member Avatar for
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
130
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
96
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
144
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
105
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
341
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
271
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
54
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
92
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
107
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
75
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
63
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
129
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
45
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
137
Member Avatar for sagy26.1991

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

0
146
Member Avatar for yanwick

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 …

Member Avatar for diafol
0
867
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
140
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
107
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
71
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
67
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
118
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
223
Member Avatar for vizz

<script type='text/javascript' src='http://code.jquery.com/jquery-1.4.4.min.js'></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"> </script> [CODE] <ul id="navlist"> <li><a href="home">Home</a></li> <li><a href="contact">Contact Us</a></li> <li><a href="about">About Us</a></li> </ul> [/CODE] [CODE] #content{ width: 100%; height:350px; display: none; background: orange; position: absolute; left: 0px; bottom: 0;} [/CODE] [CODE] <script type='text/javascript'> $(document).ready(function(){ $('#navlist li a').click(function(){ $('#content').hide("slide", { direction: "down" }, 900); var …

Member Avatar for vizz
0
124
Member Avatar for fredfletcher

Hello, I am trying to merge 2 Javascripts together in order to check if: User has entered info in all required fields, and if all fields were filled, to process the next function being (attach/upload a file), will show a "Uploading... Please wait." message (in DIV below). I tried onsubmit="return …

0
84
Member Avatar for softDeveloper

Hi all, I'm using google chrome as client of my web application. If I open it with mozilla or ie it won't work 100% all application features. Does anybody know the differences concerning iframes and document selection for example in the following lines of code: [CODE] self.parent.iframe[i].getSelection().getRangeAt(0); map = document.createElement("map"); …

Member Avatar for stbuchok
0
138
Member Avatar for shaan_046

Hey guys. I am getting an error in this jsp code in line13 i.e PopulateTextbox obj = new PopulateTextbox(). What is wrong in my code. Am i declaring the function at wrong plae or missing braces anywhere. Please help. ? [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page …

Member Avatar for stbuchok
0
198
Member Avatar for extjac

Hello, i have a very basic question. Is there a way to hide the file name/folder (ajax/post.php) used on the AJAX post request? [code] $.ajax({ type: 'POST', url: 'ajax/post.php', data: data, success: success, dataType: dataType }); [/code] I dont want people to see this: 'ajax/post.php',

Member Avatar for johnsellinge
0
134
Member Avatar for shaan_046

Hey guys. I am getting an error in this jsp code in line13 ( PopulateTextbox obj = new PopulateTextbox();). What is wrong in my code. Am i declaring the function at wrong plae or missing braces anywhere. Please help. ? [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page …

Member Avatar for stultuske
0
232
Member Avatar for softDeveloper

Hi all, I'm using scrollintoview to scroll to the element but it's very quick, do you know anything like this but smooth?

Member Avatar for Troy III
0
156
Member Avatar for zackh123

Hello, I am currently helping my BI team convert a Cognos Tree Object into a Javascript tree object. The part where I am stuck is using javascript to parse the XML data file that would normally fill up the Cognos tree. Here is an example of the XML data file... …

Member Avatar for Troy III
0
508
Member Avatar for Violet_82

HI there, I am attempting a crossfade based on [URL="http://www.simonbattersby.com/blog/simple-jquery-image-crossfade/"]this[/URL] but needless to say it is not working as nicely as it should. What I have done was to run through the code in the above example, understand it - or at least attempting to do so with a bit …

Member Avatar for Violet_82
0
101
Member Avatar for Violet_82

Hi there, I am a little stuck with a slideshow I am developing. On this site [url]http://antobbo.webspace.virginmedia.com/petras/home.htm[/url] the slideshow is working fine, it is a javascript slideshow: [CODE] <script type = "text/javascript"> var imageList = new Array( "images/homepage/home_0.jpg", "images/homepage/home_1.jpg", "images/homepage/home_2.jpg"); var frame = 0; var image; function init(){ setInterval("animate()",1000); image …

Member Avatar for Violet_82
0
166
Member Avatar for softDeveloper

Hi all, I want to upload a file the way input type=file does, but I want to upload it as a client to a remote server. Any ideas please?

Member Avatar for softDeveloper
0
131
Member Avatar for skald89

I have external links opening with the "fancybox" jquery plug-in when clicked on. I want to be able to have the web page in the fancybox scroll down when it loads. (Any place on the page is fine, this is just a learning exercise) I have marked my code to …

0
107
Member Avatar for aynamohol

Suppose fields: id, uname, ufullname, upass, uemail I would like to add an option for users to update there profile. Users will update profile which make changes without reloading page. Every field will show once user clicked on Update profile. My needs little different than others tutorials i have searched …

0
61
Member Avatar for soft_coder

Hi! I have the following scenario: [CODE] <html> <head> </head> <body> <iframe id="iframe_page" src="https://www.samplepage.com"/> </body> </html> [/CODE] Please see the html above. Here I have an iframe loading a page in another domain. What exactly happening is, first the iframe loads a page in our domain then that page redirects …

0
61
Member Avatar for kenng

Hi there, I was trying to create this code to put in my wordpress post. I've no idea how and need help it. When the user click on the iphone 4s, it will load content below table to choose firmware, and computer's operating system, and it will link to the …

Member Avatar for kenng
0
89
Member Avatar for hallianonline

Hello i have a js file named as get.js I have a variable which have base64 encoded string in it and now I want its decoded values which writes in document.write function but I am getting blank results when I include this file in body of my html plz help …

Member Avatar for stbuchok
0
105
Member Avatar for davy_yg

[URL="http://ocklaw.com/new/"]http://ocklaw.com/new/[/URL] Can anyone help me fix the navigation. 1)I would like a horizontal navigation botton NOT vertical like in the link. How to create a horizontal navigation button. 2)I would like to erase the numbers. If anyone could help me answer one of the question you are welcome to answer …

Member Avatar for stbuchok
0
100
Member Avatar for kutchbhi

user types text in a text box, the text is sent to a php script with ajax. The response is used to populate a select menu. I am getting a xmlResponse is null error with some browsers. Steps to recreate problem: 1. Goto [url=http://kutchbhi.x10.mx/choose.php]Example page[/url] , in firefox/chrome. 2. type …

Member Avatar for kutchbhi
0
153
Member Avatar for kurtzky123

I have a Parent window with two radio buttons (Yes and No) and a Submit button. If the user selects No and clicks the Submit button, a popup child window will appear. Is there a way to dynamically close the child page if let's say, the user clicks the Yes …

0
48
Member Avatar for ajcoder

I need to do a name game for class. I'm clueless where to start. I'm so new at Javascript, I just don't know what to do. Can you help? I want to know how to do this and understand why. You will create JavaScript code that will allow a user …

Member Avatar for jmichae3
0
265
Member Avatar for softDeveloper

How to get the parent node for all selections? this just give one selection out of 4 iframes: [CODE] self.parent.frames[i].getSelection().anchorNode.parentNode.outerHTML=self.parent.frames[i].getSelection().anchorNode.parentNode.innerHTML; [/CODE]

0
87
Member Avatar for bhuvan83

hi every1 i m new to website development. just learning it. i have made a code in which i access my database(MS Access). i m able to print the first record of the database on the page. but i m not able to go to next record which i want …

Member Avatar for Vetha
0
249
Member Avatar for softDeveloper

Hi all, how can we replace the getSelection HTML in an iframe? I want to getSelection() and the replace selection's html with simple text.

Member Avatar for softDeveloper
0
168
Member Avatar for softDeveloper

I'm getting xmlHttp.readyState 1 when sending these parameters and it only happens when parameter 'text' is very big. [CODE] var url="replaceText4.jsp"; url=url+"version="+version+"&work="+actualWork+"&secName="+secName+"&text="+text; xmlHttp.open("POST",url,true); xmlHttp.send(url); [/CODE] Could you help me on this?

Member Avatar for softDeveloper
0
142
Member Avatar for Milutz94

Many people are searching for this code, and not all codes are working for them :) So, this is a bit easyer, ussualy a .js and/or .css file are required, but this one is simple! [B]STEP 1[/B] Paste this into your page header: [CODE]<script type="text/javascript"><!-- function setFirstChildImgDisplay(el,vis) { if(!el || …

Member Avatar for stultuske
0
271
Member Avatar for softDeveloper

Hi all, I want to send big amounts of data, like a very big text with 3 Mb from an iframe to a database. For this I send the text from javascript side to JSP and from here to MySQL. When the text is big like this the text is …

Member Avatar for softDeveloper
0
130

The End.