17 Topics

Member Avatar for
Member Avatar for mattyd

Hello. I have one question. I have a form which I wish to clear all fields upon refresh/reload (*except one field*). Using onload and onunload, all fields are cleared but I need to retain one field upon a User doing this action. Is there a method where I can perhaps …

Member Avatar for mattyd
0
1K
Member Avatar for witakr

Hello good people. I am trying to add a snippet of javascript to the head tag of a mobile site that checks if the visitor is using a PC and if the visitor is viewing the mobile site on a PC I want them to be redirected to the normal …

Member Avatar for almostbob
0
534
Member Avatar for owenransen

It seems to me that the Audio object can not be easily played inside a JavaScript callback when running on a mobile device. The code below shows an onload function which, on a PC, plays the sound when the web page is loaded, but on Android phones plays nothing. My …

Member Avatar for owenransen
0
313
Member Avatar for josverhoeff

Hi, I thought I'd share this with you. If you want all fields on a web form to be emptied of ther initial value (if any) on focus and filled again with the initial value on blur. Works with jquery.

Member Avatar for JJenZz
0
246
Member Avatar for jonsan32

My button uses the following. It produces a random post within my blog whenever a user clicks it. <div id="myLuckyPost" class="random button"></div><script type="text/javascript"> function showLucky(root){ var feed = root.feed; var entries = feed.entry || []; var entry = feed.entry[0]; for (var j = 0; j < entry.link.length; ++j){if (entry.link[j].rel == …

Member Avatar for jonsan32
0
6K
Member Avatar for green-script

trying to make this script work: <script type="text/javascript"> var tmp='<html><head><title>popup</title>'; tmp+='<script type=text/javascript>'; tmp+='function nowTime(){'; tmp+='var oNowTime=new Date();'; tmp+='var iMonth=oNowTime.getMonth();'; tmp+='var iDate=oNowTime.getDate();'; tmp+='var iYear=oNowTime.getFullYear();'; tmp+='var iHours=oNowTime.getHours();'; tmp+='var iMinutes=oNowTime.getMinutes();'; tmp+='var iSeconds=oNowTime.getSeconds();'; tmp+='var iMilliSeconds=oNowTime.getMilliseconds();'; tmp+='var sNowTime=iHours+":"+iMinutes+":"+iSeconds;'; tmp+='return sNowTime'; tmp+='}'; tmp+='function nowDate(){'; tmp+='var oNowTime=new Date() '; tmp+='var iMonth=oNowTime.getMonth()+1'; tmp+='var iDate=oNowTime.getDate()'; tmp+='var iYear=oNowTime.getFullYear()'; tmp+='var iHours=oNowTime.getHours()'; …

Member Avatar for AleMonteiro
0
729
Member Avatar for devin2203

Hi In my application I have a test for distance using google maps api. As you can see above if the postcode is within range the page is redirected to the menu page. I have created a very simple lightbox using css and the onclick function. I want that div/lightbox …

0
130
Member Avatar for Ksrinivas92

I am trying to create a webpage which does the following: 1)Has an image,which has an onclick javascript function f1() and an image map with a link pointing to a javascript function f2(); 2)updateAnim() is an "animation" it changes the image sources some 30 times 3)f2() is any function(trying with …

Member Avatar for Ksrinivas92
0
202
Member Avatar for evilguyme

Hey guys! was wondering if anyone knows anything about how to make a popup appear with an image as soon as the page loads.. lots of sites have this and i couldnt find it anywhere on google.. im pretty sure it can be done with java but i may need …

Member Avatar for pritaeas
0
86
Member Avatar for aaloo

this is my as2 code , i m trying to get variable t outside the onload function but failed , somebody help me !!! [CODE]$i=0; myData = new LoadVars() myData.load("http://localhost/exercise/"+$i+".php") myData.onLoad = function(succes) { if(succes){ var t:Number =myData.total_pages; a.text=myData.t1 b.text=myData.t2 c.text=myData.t0 tp.text=t } else trace ("Error loading data") } next_.onRelease …

0
106
Member Avatar for jrotunda85

We currently have a system that display multiple sections on one page when it loads. What we were looking at doing is breaking each section into an expandable/collapsable group that is controlled by the end user with all groups collapsed on load by default. In saying that, is there a …

Member Avatar for ArtistScope
0
140
Member Avatar for Jagfarrell

HI all, Normally I've been lucky to find someone who has had the same problem and applied their solution but after hours of searching I'm not able to find a solution to this one. I've got a FormView which is default mode set to Insert. When the page is loading …

Member Avatar for Jagfarrell
0
150
Member Avatar for richardmorris

I want to be able to open a window with a variable. For example, I will use domain.com?reference=1234- This link will open a pop up window as follows: [CODE]<a href="javascript:popUp('http://www.domain.co.uk/staff/tpr/update_action_log.php?action_reference=<?php echo $row2['action_reference']; ?>')" title="Click Here edit this entry"><?php echo $row2['action_reference']; ?></a>[/CODE] When I open this window, it is always showing …

Member Avatar for Airshow
0
201
Member Avatar for sugumarclick

Hi javaAddicts I am a novice java programmer. I am in a learning process in java servlets. How to load a servlet and invoke its method from index.jsp. I want the servlet to execute first and dispatch its value to index.jsp and also i dont want to use redirect from …

Member Avatar for Stefano Mtangoo
0
3K
Member Avatar for pietpiraat

Hi everyone, i have a piece of javascript that calculates 2 input fields (price * qty) whenever i type in the input field (qty) that uses this : [CODE]onkeyup="update(this);"[/CODE] Now what i want is to execute this handling when the page loads, because sometimes there are already values (php & …

Member Avatar for hielo
0
223
Member Avatar for jmaddy10

Hello all! So I am creating a redirect page so that when someone signs up for our newsletter they're taken to this page and 10 seconds later, redirected to another page. The script I'm using isn't working for some reason. I originally had it in a seperate .js file but …

Member Avatar for fxm
0
4K
Member Avatar for lifeworks

I tried to get as much info into the title as posible... hope it doesnt confuse anyone i have an initAll() called on window.onload within initAll() I assign a few onclick handlers to some links. However, it would be great if I could pass an argument to the handler, so …

Member Avatar for lifeworks
0
1K

The End.