I have a form which passes an IP address to another page which then runs a
function to resolve a host name. I am trying to pass the form name 'ip' to
the string, but am having problems with the syntax. Code:
i having problem on passing the database query result to the javascritpt for calculation.i doing a program that need to calculate the total_price for the purchase items. i use getString to get the foodID, f_item and the unit_price from database, then i need to use the unit_price for doing the calculation in javascript. after get the data from database, the unit_price is used to multiple with the qty that user input to calculate the total_price.since there are several row of data get from database, so user need to enter the qty for each item and then press [Calculate_db] button to perform the calculated result. hence, the total_price for each item is calculated and the sum of all the total_price also being calculated and display in the page.now, i having problem on pass the unit_price to the javascript for calculation.
Below is a stock script I found which controls a framed environment. My problem is that if a URL has a query string attached, that string does not pass through. Can someone please let me know if and hopefully how, it will be possible to carry a query string through?
This first part here is in the default.asp framed page. Code:
What I am attempting to do is have a link/button on a page (testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup page displays a resultset from a query and the selected record needs to be passed through a query string/URL parameter to the original calling page and will be available in the body onload event of the calling page.
I open the popup window and display the query results, I then click on a record and the record is then displayed in the calling form textbox (txtOrg) - - - only the calling form appears in the POPUP window! This is not what I need it to do. I need it to pass the URL parameter to the calling page and close the popup. Here is the code from the two pages. Can you shed any light on this? ....
I'm trying to parse a string from a URL and pass it as a parameter to another function. If that parameter meets certain conditions, I want hidden fields in my form to "unhide".
I am giving 3 usersr a specified url i.e. (http://DOMAINNAME.com?usr=uk or http://DOMAINNAME.com?usr=france) and based on that url, we'll parse the name and pass it as a parameter to a function. (i think i expressed that right??) Then we will display the proper shipping address depending on the parameter passed. My only problem now is, i'm horrible at writing regular expressions and programming in general. Do you or anyone else out there know of any good url parseing functions? I've been doing mostly project management throughout my career and never really got a chance to become fluent in javascript or programming for that matter.
I am using ajax to pass php variable to javasccript function as shown below for my particular application.
i am using the foolowing function from ajax.js freely available from net to implement the ajax functionality as
var abc = new sack(); PHP portion which passes the response text: ************************************ <? $table=$_GET['tablename'];
[Code]....
1] When $table is having a string with only numeric characters for eg: "123" we get the alert
2] When $table is having a string with alphanumeric characters for eg: "123efg" we get the error report as "missing ) after argument list"
3] When $table is having a string with alphanumeric characters for eg: "efg123" or "abcdfr" we get the error report as "efg123 is not defined" or "abcdfr is not defined".
In the following example, I use the function "SetUp(SBox,AObjStr)" to send an object reference to the function "Populate(SBox,SObj)".
Seems to work OK, but it is a 2 step process to assign the JSON objects to the selected drop-down boxes. Fairly easy, but somewhat tedious, to change to fewer or more levels as desired with a common bit of code.
However, what I would like to do is simplify it a bit more ... Is there a way to bypass the "SetUp" function to "Populate" the multi-level drop downs directly? I think what I'm looking for is a way to pass a string in the function that would be recognized as an object (in this case a JSON or other form of array) and be decoded to add options to the drop-down choices, but I don't have a clue as to how that might be accomplished without the extra "SetUp" function!
Now i just want to edit one thing, when you search for something, results are shown under the search field, when you click on each result, goes to a link.
I want when clicking on a result, not going to link, just show that result string on the search field. where should i edit in script?
Im looking to make work my script on both IE and Netscape. It works fine in IE, but netscape cant handle "dynamic" variables. I need some help!
Is there a CORRECT way to pass a string as parameter and then use it as an object in Netscape? IE does that without problem... and Netscape seems not able to handle it.. Code:
I'm a beginner in Jquery and I have a big doubt, follow at bellow the code to be better viewed: The method below is static and Static methods do not work with instance, For this reason I passed the 'nameLabel' that the typeis Label by parameter, however I need to catch the exception and show it to the user.
But I'm using Jquery and this method is used in a Ajax Request and I use the Json to pass the datas, how showed below: var idCliente= $("#<%= txtIDCliente.ClientID %>").val(); var nomeLabel = $("#<%= lblMensagem.ClientID %>"); var poligonal = "{ idCliente: " + idCliente + ", + lblMensagem: " + nomeLabel + " }"; But the problem is that I need to pass in my Json the nomeLabel with Label, but always a problem happen, because the same is showed like 'indefined'. How to solve this situation?
trying to write a function where i can pass an array and string and replace the value in return. i.e
var inputStr = "010203040506070809111213141516171819";
i want to pass this value in function and replace each number (number ranges are 01-09 and 11-19 only) i.e if i pass 01 want to replace that with A,02 with B etc.. so problem is i would pass input string and pass back as string after replacing those values by running through the below function. wrote the following,cant seem to split my inputStr into 01 02 etc tried splice and split no luck :
I am running this javascript on a Windows IIS server. It is in a .asp page. The script seems to run OK. When you click on and release the "Calculate" button, the answer flashes and then disappears. The answer seems to be correct, but I want it to remain visible until the form is reset. The code is as follows. What am I missing? This is my first attempt at javascript coding. Code:
I have a question about generating results in fields automatically without submitting or onclick onblur etc.. Just the result would generate and show as soon as I start filling in fields.example I would like to fill out my size qty and have the result show in field QTY_1.
So I decided on my midterm project its going to be a simple gas/trip calculator that calculates the cost of the trip with regards to price of gas an how many miles your going. I am just learning how to use the DOM so please be nice with me lol. Anyway I understand how to grab a field from a form an slap it into a variable but what i cant figure out is how to make the result appear in the result input field. So Here is my code.
<!-- Gas & Distance Calculator Author: Kevin Grissom
I would like to know if it is possible to load form result in the same window after clicking the validation button. I know this method that load elements from the server on the current page after changing an input value. (Using methods: change() and load() )[URL] Is it possible to do same with forms, and which methods to use?
I create a form dynamically with Java Script depending on certain actions a user choose. The end result is a form asking the user to confirm sending one or more SMS message via a message gateway outside of my system. Confirmation will then trigger a funtion with one or more statements like this: [CODE] document.frmSMS.action ="[URL] user=User&password=Password&sender=Sender&SMSText=Friendly Reminder from Joe Bloggs Pty Ltd: You have an outstanding amount of R 4,534.00 that is 135 days ovedue. Please settle to as soon possible.&IsFlash=0&GSM=27826555959"; document.frmSMS.submit(); [ICODE] The target site then responds with either an error code (i.e. -10) or a reference number. The question is - How do I retrieve the error code?
this form look up some holiday destination which appears on this page with url: [URL] Now, I dont want to display result on this page, but on page B, in iframe.I found a way how to redirect output as a link to properly show in iframe on page B.
Page A contains:
<a href="pageb.html?http://www.domain.com/find.html?destination=italy&price=500">show on page B</a><br> Page B contains: <script type="text/javascript">
[code]....
In this case page B will properly load requested link in iframe.Problem is it is just a static link... I want to display search result from the form.
Let me preface this with the usual disclaimer: I am new to this and have only been programming with Javascript, PHP for about 2 weeks now and have been lucky enough to have resolved the issues I have encountered. This one however is puzzling to me.
I have a HTML form created that collects member information. It calls, on submit, a confirmation page that lists all the data fields entered. This all works great. However, when I then post the variables from the first html form page from my second confirmation html page to my PHP script, using document.write with input type=hidden and inserting the address variable into the value field, the Javascript only passes this variable up to the first space. It is the only variable I pass that has a space in it.
I have verified that the variable does indeed contain the whole address and I have also verified when I execute the following: document.write ('<input type="hidden" name="address1" value='+address_1+'>');
the address_1 parameter passed to the php script only passes the string up to the first space.
I even tried to put fixed text in there instead of a variable (e.g.)
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame.
I want to detect when the frame has been loaded with the result of the form submit.
Of course I have tried some event handlers like onload, onactivate, onreadystatechange, but they do not work in this example. They only seem to work, when the "SRC" attribute of the "IFrame" is set, e.g. not when the IFrame is set as the target of the form.
I run a website for a skittle league and am looking to create a form to allow teams to sumbit results on line. I'm not an expert on Javascript, the code I've created so far allows the user to enter the player name and score for one team and calcutate the total. However, I'm having problems duplicating this for a second team, and would like to remove the Get Total button (i.e. Auto Calculate total).
The Code I have so far is <html> <head> <script type="text/javascript" language="javascript"> function getTotalH1(oForm){ var field, i = 0, total = 0, els = oForm.elements; var fieldnames = ['PSH1' , 'PSH2' , 'PSH3' , 'PSH4' , 'PSH5']; for (i; i < fieldnames.length; ++i){ field = els[fieldnames[i]]; if (field.value != '' && isNaN(field.value)) { alert('Please enter a valid number here.') field.focus(); field.select(); return ''; .....
I have a simple calculator on my website which has a few options selectable by radio buttons. When the user adds selections - the total price of their order is automatically calculated and displayed in a <div> for them to see. The client then can deselect options or add according to their budget. The code which deals with this is as follows (just sections of it but you get the point ....) In the <HEAD>
<script type = "text/javascript"> var allprices = []; var index = 0;