|
I believe you need to give your checkboxes and controls Ids, so that you can get their values out of the form. But, I have to admit that it's a long time since I did ASP, ASP.NET is so much nicer.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
As this has to be done in the browser, it has nothing at all to do with ASP. You have to use client script, i.e. Javascript.
Don't you have any more direct way to identify the fields than to loop through the elements of the document?
If the id of the checkboxes are for example Chk_1, Chk_2, et.c., and the id of the elements in column three are Data_1, Data_2, et.c., you can easily access them directly using document.getElementById.
---
Year happy = new Year(2007);
|
|
|
|
|
I've heard from a post on this forum that getElementsByName was discontinued, and that's a shame because it would have been very easy to retrieve your unique NAME of your checkbox collection into an array and work on this array.
Since it seems to be like this, i now use getElementByTagName to retrieve from the DOM, all tags that correspond to <INPUT> and then work on those whose ID correspond to what i want. First to get a count, and then iterate through id's
Example:
var objdiv = document.getElementsByTagName('DIV');
var contar = 0;
for (i=0;i < objdiv.length; i++)
{
if (objdiv[i].getAttribute("name")=='contentitemdiv_'+wid+windice)
contar ++;
}
for (i=1;i<=contar;i++)
{
var wobjcontentitem = document.getElementById ('contentitemdiv_'+wid+windice.toString()+i.toString());
}
if there's more simple, call me!
|
|
|
|
|
This is my second week using ASP and I've run into some problems with array and split. Please look at the following:
<%Dim x, y, t, z(3)
z = split(t, ".")
x = z(0)
y = z(1)
%>
t = 9.95
I keep getting the following error message:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
What am i doing wrong???
-- modified at 12:27 Tuesday 16th January, 2007
Ty
|
|
|
|
|
Well, for starters, t has no value.
Why are you learning asp ? It totally sucks. Is there any way you can switch to ASP.NET ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Dear Tyrone_whitey,
Remove the Dim statement and Execute. This solves your problem.
Regards,
Manowj
|
|
|
|
|
i have a static html page.
i have a link in it to download a pdf file.
i want to force download the file, not to open it, when user click on it.
but if user had installed acrobotreader in his/her pc, my link open the file directly. but i dont want to act so. i want file to be downloaded.
thanks
rastgar
|
|
|
|
|
You can't force anything with a static HTML page, I don't believe. You'd have to zip the file.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
how about with javascript?
Thanks
Rastgar
|
|
|
|
|
You can't go too far with JavaScript either. You can open in a new window.
|
|
|
|
|
On your server try configing the HTTP headers to include the "Content-disposition" header.
Brad
Australian
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
just call a javascript function with an open command to the link in onclick event.
Example: open("download/file.pdf","_blank");
this will ask you if you want to open or save.
|
|
|
|
|
You want to pop up a message in the browser when the user moves their mouse over a control ?
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi all,
I have to load a HTML Page(Child) into my ASPX page(Parent) when the page is loaded.
Child Page: The child page is a portal page which requires authentication.Portal site reads my credentials from the header of the parent page when a request is made and navigates to requested page.
Problem: i am using XMLHttpRequest to call the child page, portal site authenticates me by writing a message("please wait while verifying the credentials"). At this point the readystate of XMLHttpRequest object is complete, so i am getting authenticating HTML Page instead of getting the child page.
Is there another way to load the page or what am i doing wrong. Please see the Java script code below
Thanks in Advance.
CODE IS BELOW
function AjaxTest()
{
var xmlHttpObj= (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
//Portal Web page
var Url='http://imsportal.dev/ims/secure/portal/external/tooltip/?cId=45059139&cId=45059152';
if(xmlHttpObj)
{
xmlHttpObj.open("GET",Url,false);
xmlHttpObj.onreadystatechange= function (){
if (xmlHttpObj.readyState==4 || xmlHttpObj.readyState=="complete")
{
var xmlopt=xmlHttpObj.responseText;
document.getElementById('divVnetText').innerText=xmlopt;
document.getElementById('txttest').innerText=xmlopt;
}
}//Function Change state End
xmlHttpObj.send(null);
}
}
Thanks,
Sravan
|
|
|
|
|
Can you not just use an iframe?
|
|
|
|
|
First thanks for replying.
No we are not allowed to use iframes. But even if I use iframes the requesting page is on a portal page, so after authenticating it would redirect me to the requesting page using window.open().
so the entire page is redirected not just the iframe.
Can you tell how i can do this server side with credentials being passed.
Thanks
Thanks,
Sravan
|
|
|
|
|
Sir/Madam
I am Final Year Engineering student. I want to get information about connection of computers at different cites.
Actually if I want to computerize a department of any company which have its offices at several cities then what steps I should follow.
Means how I can connect that no of computers in appropriate manner to get desired output.
I want to make it just like railway reservation system through in which if I enter data at same time then database must be able to prioritize data in sequence to enter in database.
Which database & platform or language I should use to code this kind of project.
Thank You
Ashish Porwal
|
|
|
|
|
Wow! I think he would love to have a checkbox besides the textarea which says 'Post in all forums' in one click, to save trouble of copy paste and cross posting.
|
|
|
|
|
Excellent idea. Should be one for the Suggestions.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Interresting. Then he can actually make a post in Suggestions that actually belongs there...
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
I've been working on local host to create a webform in asp.net. now I'supposed to deploy it on another server how could I do this?
Thank you
|
|
|
|
|
You could use Visual Studio to copy the project over. In VS2003, it was Project > Copy Project.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Naughty naughty . Sneaking a cross post in like that.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello,
any body can help me in crawling a google search result. i want to get all the links from the search result.
thanx
Dotnet
|
|
|
|
|
Please don't cross post. It is considered to be bad form.
the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
Deja View - the feeling that you've seen this post before.
|
|
|
|