15,127 Topics
| |
| Hi guys, I was making a text based game in javascript.. Here it is: <!doctype html> <script type="text/javascript"> //Experimental Code - Text Based RPG function error() { alert(+choice+ "is not a recognised command") maingame() } function maingame() { choice = prompt('You find yourself in a dark room...do you\n[1]Eat cheese\n[2]Do stuff') … |
| Hi, I'm new to JS: <!doctype html> <script type="text/javascript"> //JS start function give_me_an_alertbox(): alert("This is an alert box."); //JS end </script> <a href="javascript: give_me_an_alertbox()">ALERT BOX!</a> How come this code does not work!? How do I refer to Javascript using `href` ? |
Hi all, I have a video on a page on our company website, it's live but not accessible without the URL, it's not displayed on the website yet. Anyhoo, what I'd like to do, is progressively download it, as soon as you turn up to the website, is there any … | |
I dont know if this code actually exits, however I can't figure how to do it. You know how you can write javascript in a url of a website and write a command, I would like to do that except remotely. So something like this: >load website remotely (without loading … | |
window.print method not working in ie browser **mycode:** <html> <head> <title>main</title> </head> <body> <h1>Pop & print</h1> <button onclick="pop();">Pop</button> <script type="text/javascript"> var POP; function pop() { POP = window.open('', '', 'width=350,height=350'); POP.document.write(" message content message content message content message content message content <br/>"+"<a href='JavaScript:window.close()' style='float:right;'>Close</a><a href='JavaScript:window.print()' style='float:left; text-decoration:none;'><input type='button' value='Print this … | |
Trying my hand a Javascript, I came across an issue with XMLHttpRequest. This is probably something I'm doing wrong, so any help would be appreciated. reader = new XMLHttpRequest() reader.open("GET","Votes.xml") alert(reader.readyState) reader.send() alert(reader.readyState) when I run this, it alerts that the readyState is 1 (Send has not been called) and … | |
Good day All: I was wondering if anyone have had experience dealing with the browser history inside an Iframe. Specifically, how to navigate with the back button throught the history inside the Iframe ONLY, and not the entire page. I have an Iframe that is called inside my page like … | |
I'm trying to develope a Javascript fuction that will show the current funds raised. I'm needing to be able to specify a Start Dollar Amount ($0), Goal Dollar Amount ($XXX,XXX,XXX), and a Current Dollar Amount ($XX,XXX). I would like to have this show up as numerical amount and then also … | |
I have three javascript/jquery scripts and I need all of them. I am new in jquery so not able to add all three scripts. If I do all then one of them do not work. I need to put all three scripts into one. <script type="text/javascript"> $(function(){ // off $("#pgfor").twoitems({ … | |
Hi , I need to know how to pass html element into jquery function. My sample html code is given below: <html> <head> <script src='../../core/js/jquery-1.4.2.min.js'></script> <script src='../../core/js/jquery-ui-1.8.1.min.js'></script> <script src='../../core/js/extensions.js'></script> <script src='../../core/js/prot-lib.js'></script> </head> <body> <table> <tr> <td class='r1'> <chl class="chl"> <chli class="menu-list"> <li id="s0" class="item" onClick="handle('s0')">NJ</li> <li id="s1" class="item" onClick="handle('s1')">TX</li> </chli> … | |
I am working on a redirect script for a fancybox that loads a video, and then redirects the user to a new webpage when the fancybox is closed. I have the loader, and the redirect working. However every video that is loaded redirects to the same page. I believe this … | |
<?php include 'functions.php'; if(!loggedin()) { header("Location: index.html"); exit(); } $session = $_SESSION['empno']; $dbName = mysql_query("SELECT ename FROM employee WHERE empno = '$session'") or die(mysql_error()); $nameResult = mysql_fetch_array($dbName); $name = $nameResult['ename']; $reqno = $_GET['id']; //echo $reqno; exit; $amtApproved = $_GET['amtApproved']; $query = mysql_query("SELECT * FROM requisition WHERE reqno = '$reqno'") or … | |
Hello, I have a problem with an Ajax call on IE9. I have searched the internet and this forum for solutions for a few hours and can't find an answer. I have a coffee roastery site (developed with Codeigniter), where the users can order coffee bags online. The user selects … | |
Hi, I've been working with Ruby on Rails to make a web application, but I've found something that I really cannot work out how to do with it, so it may be best if I do it manually. Basically, I've got a dropdown menu, that is populated with a list … | |
hi, i have menubar.click menubar content load the particular url in this page. $(document).ready(function(){ $('#menubar li a').click(function(e){ e.preventDefault(); $('#userpersonal').load("http://localhost/user/web/personal/index"); }); }); what is the problem in my code. plz help me | |
I am wondering if I am trying to do too much or if there is a better way for a client-side form I wish to create. A limited working prototype for what I have so far appears here: [http://cookbook.dwlamb.com/edit.html](http://cookbook.dwlamb.com/edit.html) I am using a table as the frame for the form … | |
Hi! I have written this function in javascript. The problem I'm facing is that even when the text field in html form is empty, this function behaves as `alert("");`. It must display "Enter some text" in alert box. The function, however, works well when I enter "Hello" in the text … | |
I want to make HTML appear as text to maybe write some snippets on a site. I know that there is a way to make < and > by using < and > but I would like something that were a bit easier to remember and quicker like maybe using … | |
How to create a website which i want to create by using a vb srcipt and also i want to make a use of java script in this.pls help me out..give me suggestions regarding this. | |
is it possible to preview the image in popup window. below is my basic code but i really dont know how to call the selected picture to view in the popup window. function newPopup(url) { var img = document.getElementById('photoimg').value; urla = url+'?img='+img; popupWindow = window.open( urla,'popUpWindow','height=700,width=680, left=300,top=10,resizable=yes,scrollbars=yes,toolbar= ,menubar=no,location=no,directories=no,status=yes'); } <form … | |
Hello all! I am using a little piece of code in a report I'm generating (LogiXML). It is a "back" button that takes the user back to the previous page.. It does not however, use any form of a history, back, location javascript code. It just uses a plain old … | |
Hi People, Got some issue with radio buttons... I want to pass the form details WITHOUT PAGE REFRESH.... I have a textbox and 2 radio buttons with values Subscribe and Unsubscribe and a submit button. The user has to enter his E-mail id in the given textbox and select either … | |
Hi. So I have a website (SNIP) and I am setting up a phpBB forum (or something else). But......I'm going mobile-style! Is there anyway I can make it so anytime a new post comes up (assuming the person is on the website), the person gets a push notification or something? … | |
can anybody tell me how i can upload a file without user interaction.the file full path is known and can be hardcoded.there will be a button on page when user press it the file should be uploaded. Active-x i sone solution but for that the user have to low down … | |
Hi there, I am working on an accordion, I am more interested in the way it works, but I am having some problems. I worked on something similar sometime ago, and got some help in here, but I thought I will try to do it again on my own..and ehm, … | |
I need code for iframe for the replacement of frameset. My frameset code is <frameset rows="14%,*"> <frame src="logout.html" scrolling=no> <frameset cols="25%,75%"> <frame src="Players Name.html"> <frame src="Dhoni.html" name="secondframe"> </frameset> </frameset> I need it in iframe. I cant able to nest iframe which i did in frameset. Is it possible to write … | |
Hi all, I found this code : http://www.magic-dev.com/drag-drop-multiple-items.htm It works perfectly. However, if I pass these elements by ajax to a javaserverpage,they will be displayed, but won't either be dragged or dropped even If I have all the droppable and draggable functions and jquery libraries in the destination page, it … | |
Hi, Code below works fine up to **hr**. For some reason, html code appears as is in textarea. It should first appear as notmal text. Anyone know why? Thanks <!DOCTYPE html> <html> <head> <style> p { margin:8px; font-size:20px; color:blue; cursor:pointer; } b { text-decoration:underline; } button { cursor:pointer; } </style> … | |
Could someone explain in the most simplistic terms possible why this doesn't work: var cell00501=row005.insertCell(-1); cell00501.align="center"; cell00501.width="8%"; cell00501.onclick="RadioClicked(0)"; cell00501.innerHTML="<IMG SRC='RadioOn.jpg' BORDER='0' NAME='Spangle0'>"; By doesn't work I mean the onclick event doesn't result in the RadioClicked() function being called. I have come up with the following workaround: var cell00503=row005.insertCell(-1); cell00503.align="center"; cell00503.width="8%"; … | |
How can i stop someone from posting when this form is empty? Here is my form: <form name="message" action="" > <center><input name="usermsg" type="text" id="usermsg" size="63" /> <input name="submitmsg" type="submit" id="submitmsg" value="Send" /></center> </form> Sanchixx |
The End.