|
sorry to interrupt again, i have another question regarding the code... how can you add another textbox at the bottom that adds all the sub_total to produce the grand total? i tried this but it does not work.
function Grand()
{
for (var i=1;i<=row_no; ++i)
{
var x=document.getElementById("ourcost"+i).value;
document.getElementById("total").value += parseInt("ourcost"+i).value;
}
i placed this function on the textbox "subtotal" on a "on Change" method.
|
|
|
|
|
Just add the total into the existing Sum function:
function Sum()
{
var total = 0;
for(var i = 1; i <= row_no; ++i)
{
var x = document.getElementById("desc" + i).value;
var y = document.getElementById("itemno" + i).value;
var subtotal = x * y;
total += subtotal;
document.getElementById("ourcost" + i).value = subtotal;
}
document.getElementById("total").value = total;
}
|
|
|
|
|
I'm hoping someone can help. I'm very new to javascipt and am attempting to create a form that has hidden values to pass to Bing Search. I'm also trying to add a drop down menu that causes the value from the option the user changes to be passed along in the same url.
In short, if the user adds "java" in the text box and chooses "dallas" from the drop down menu it will incorporate these variables into the url along with the hidden words that are static, being "resume NOT jobs NOT apply". The url would end up looking something like: http://www.bing.com/search?&q=Resume+-jobs+-apply+java+"Dallas"
This is the code I have currently, that just fails
<script>
function converturl() {
document.go.url.value = document.go.url.value.replace(/\s/g, "");
var url = document.getElementsByName("url")[0];
var city = document.getElementsByName("city")[0];
var fullurl = document.getElementsByName("fullurl")[0];
fullurl.value = "http://www.bing.com/search?&q=Resume+-jobs+-apply+-submit+-required+-wanted+-template+-wizard+-free+-write+-sample+" + url.value.city
}
</script>
<form name= "go" onsubmit='converturl();location.href=fullurl.value.city;return false'>
<input name='url' type='text' /> <input name='fullurl' type='hidden' />
<select name="city"
OnSubmit='converturl();location.href=fullurl.value.city;return false'>
<option value="Dallas">Dallas
<option value="Chicago">Chicago
<option value="New York">New York
</select><input type='submit' value=" Go " />
</form>
<b>This script seems to work, but doesn't pass the city variable (url2) to bing.</b>
<script>
function converturl() {
document.go.url.value = document.go.url.value.replace(/\s/g, "");
var url = document.getElementsByName("url")[0];
var url2 = document.getElementsByName("url2")[0];
var fullurl = document.getElementsByName("fullurl")[0];
fullurl.value = "http://www.bing.com/search?&q=Resume+-jobs+-apply" + url.value
}
</script>
<form name= "go" önsubmit='converturl();location.href=fullurl.value;return false'>
<input name='url' type='text' /> <input name='fullurl' type='hidden' />
<input type='submit' value=" Go " />
</form>
<select name="city"
önSelect="location.href=url2.city.options[selectedIndex].value">
<option selected>Please Select...
<option value="Dallas">Dallas
<option value="Chicago">Chicago
<option value="New York">New York
</select>
modified on Tuesday, January 26, 2010 3:39 PM
|
|
|
|
|
<form action="" method="GET" onsubmit="location.href=converturl();return false">
<input name='url' type='text' />
<input name='fullurl' type='hidden' value='Resume+-jobs+-apply+'/>
<select name="city">
<option value="Dallas">Dallas
<option value="Chicago">Chicago
<option value="New York">New York
</select>
<input type='submit' value=" Go " />
</form>
<script>
function converturl(){
frm=document.forms[0];
return "http://www.bing.com/search/?q=" +
frm.fullurl.value +
frm.url.value + '+' +
frm.city[frm.city.selectedIndex].value
}
</script>
|
|
|
|
|
Thanks! That's exactly what I wanted to do. I appreciate it.
|
|
|
|
|
|
I need to put together a web application that will pull wieghts from the scales that are connected to client computers with Serial ports. Is there any way to do this.
|
|
|
|
|
Hi,
I am in a similar situation. I have to read data from a weighing machine located on client machine and display the value in web page text box.I have tried lots of sample code but ended up with stack of errors.Could you please share your ideas/code with me? Its really urgent....
Thanks in Advance,
Manasa
|
|
|
|
|
Hi Iam facing the same problem,could you find away to do that issue ?plz help me
|
|
|
|
|
Guys, pls is there a way of attaching to a web form a document from a scanner.
He who goes for revenge must first dig two graves.
|
|
|
|
|
If I understand you correctly, the scanned document is in the format of an image. Right ? Then couldn't you place an image control on your form and dynamically set the ImageUrl in your code behind ?
Just a thought.
|
|
|
|
|
Not entirely sure what you're meaning here do you mean you have a form already scanned in and you want people to be able to download it or convert a scanned document into a webform?
If a) Well yeah, piece of cake, just link it like the above suggestion.
If b) It depends. Personally, I would recreate it but there used to be a third party software that'd convert PDF's to webforms. It was a POS though because what happened essentially was that the PDF became a background image and you dragged and dropped invisible textbox controls and buttons over the top of it. I -think- it was called PDFformail but I don't recommend it.
|
|
|
|
|
Hello,
I am using the Visual Studio Web Developer 2008 for programming in VB.NET and i have some problems:
1. Sometimes it stops highlighting the text.
2. Is there an option to refresh the Intellisense of the page?
3. When i am including files to my page, its say variable undefined.
Global information:
* I am not using the *.cs files.
* I am not using any .net button (example: asp:input...)
* I am using the include file. (example: include virtual=...)
If someone have any idea on how to fix this problem it will help me.
If not, Maby someone can suggest another program (with Intellisense)?
Thanks,
Roy Shoa.
|
|
|
|
|
Hi
Do you now a reliable application for converting a VB.Net applicatopn to C# one?(entire project not code by code)
Best wishes
|
|
|
|
|
how to make coding for listen /watch video in asp
i have uploaded videos but the problem is that
how to upload flv player ?
i have no idea about listen /watch video.
plz help
|
|
|
|
|
To add FLV player to website, you can use SWFObject, which is more optimized and flexible than any other Flash embed method around.
You can also check this Flash video player creator, which is a quick solution to add FLV to web page and create custom FLV player for website.
|
|
|
|
|
My OS has been installed VB6 and in VB I can read local serial port data
I try to use the following code to open local serial port
-----------------------------------------------------------------------------
<html>
<head>
<title>JavaScript_COMM</title>
<script language="JavaScript" type="text/JavaScript">
function OpenPort()
{
MSComm1.PortOpen=true;
alert("opened");
}
</script>
</head>
<OBJECT CLASSID="clsid:648A5603-2C6E-101B-82B6-000000000014" id="MSComm1" codebase="MSCOMM32.OCX" type="application/x-oleobject" width=0 height=0 >
<PARAM NAME="CommPort" VALUE="1">
<PARAM NAME="Settings" VALUE="9600,N,8,1">
</OBJECT>
<body onload="OpenPort()">
FML...
</body>
</html>
-----------------------------------------------------------------------------
First, I open this HTML, it alert "opened".
and then I open the "HyperTerminal", use "HyperTerminal" to access COM1, "HyperTerminal" can read data from COM1
which means that I have visited this HTML in fact not open the serial port is not it?
help me!!!
THX Google Translate
|
|
|
|
|
Hello!
I'm developing a web application that opens a popup using windows.open(..). I need to call a function on the opened window using the handle returned by "window.open", but I'm always getting the error message "addWindow.getMaskElements is not a function", as if it couldn't access the function declared on child window. This is the behavior in both IE and FF. My code looks like this:
function AddEmail(target,category)
{
if(addWindow == null)
{
currentCategory = category;
var left = getDialogPos(400,220)[0];
var top = getDialogPos(400,220)[1];
addWindow = window.open("adicionar_email.htm",null,"height=220px, width=400px, status=no, resizable=no");
addWindow.moveTo(left,top);
addWindow.getMaskElements ();
}
}
I've googled and read from different reliable sources and apparently this is supposed to work, however it doesn't.
One more thing, the functions in child window are declared in a separate .js file that is included in the adicionar_email.htm file. Does this make a difference? It shouldn't..
So, if anyone has ran into a similar problem, or has any idea of what I'm doing wrong, please, reply to this message.
Thanks in advance.
Kenia
|
|
|
|
|
Here is a good guess.
The Function addWindow.getMaskElements ();
is being called before it is ready in addWindow.
You could try this ...
setTimeout("addWindow.getMaskElements()",2000);
That will wait two seconds before calling
addWindow.getMaskElements().
modified on Friday, January 22, 2010 10:39 AM
|
|
|
|
|
Thanks! that was exactly the problem. I did what you suggested and it works perfectly now, thanks again
Kenia
|
|
|
|
|
Kewl!
Uh, there is a better solution.
I sugessted the setTimeout just to
confirm what the problem was.
The problem with the two second delay is
you cant be sure it will be ready.
You could call addWindow.getMaskElements ();
repetively by catching
the error and setting time out again.
Or you could try this, in the separate .js file that is
included in the adicionar_email.htm
add this line ...
body.onload = "window.opener.iMready()";
in the parent page put this...
function iMready(){
addWindow.getMaskElements ();
}
if there is already an onload function
(it might be window.onload body.onload or onload
people do it different ways)
declared in the .js, you cant have
another so add this line
to the function onload points to...
window.opener.iMready();
|
|
|
|
|
In fact, that about calling repetively the addWindow.getMaskElements(); is what i did, because i didn't want to modify the function already attached to the onload event of the document.
Thanks for your time!
Kenia
|
|
|
|
|
|
hi this is my code.i want to display images whose path and image name is from database but still i m not getting the slide show working it does not show me the message.any body help me?
<!--#include file="common.asp"-->
<%
OpenDataBase conn
sql="select * from newsimage"
set obj=server.createobject("adodb.recordset")
obj.open sql,conn,1,1
while obj.eof<>true
imagestorotate=imagestorotate & """/pdf/" & obj("imagename") & ""","
obj.movenext
wend
imagestorotate=left(imagestorotate,len(imagestorotate)-1)
'response.write("image pathe is " & imagestorotate & "")
%>
<html>
<head>
<title></title>
<script type="text/javascript">
var image1=new Image();
image1.src=<%=imagestorotate%>;
</script>
</head>
<body>
<img src="<%=imagestorotate%>" name="slide" width=100 height=56 atl="no image for path">
<script type="text/javascript">
<!--
//variable that will increment through the images
var step=1;
function slideit(){
//if browser does not support the image object, exit.
if (!document.images)
return;
document.images.slide.src=eval("image" + step + ".src");
if (step < 3)
step++ ;
else
step=1;
//call function "slideit()" every 2.5 seconds
setTimeout("slideit()",2500)
}
slideit()
//-->
</script>
</body>
</html>
image is not changing one by one plz help me for image change
coz my image is coming from database table which has 30 images..
|
|
|
|
|
how do i detect visitor mac address? somehow i manage to get a piece of php coding, but it only works on server side, but not on client side...
im running on apache server
|
|
|
|