|
Try like that..
function getParam(){<br />
var querystring = "?";<br />
<br />
querystring += "word=" + document.getElementById('txtWord').value;<br />
querystring += "&";<br />
querystring += "meaning=" + document.getElementById('txtMeaning').value;<br />
querystring += "&";<br />
querystring += "example=" + document.getElementById('txtExample').value;<br />
<br />
return querystring;<br />
}<br />
Hope it helps..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
He should also pass the values through encodeURIComponent() before appending them to the querystring.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Yeah. I forget that. thanks.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
can I do it as?
A word can have more than one meanings. So I insert elements dynamically according to the user.
I want to access them using like this
function getParam()<br />
{<br />
var querystring = "?";<br />
for(element in document.formname.elements)<br />
{<br />
querystring = querystring + element.name + "=" + element.value + "&";<br />
}<br />
return querystring;<br />
<br />
}
Shoaib Nawaz
|
|
|
|
|
As I don't know how many HTML elements exist in your page, I can't say that..
If you are sure that you want all values from all elements of your page then you can do it.. but if you do like my example, you won't miss anything....
So, I recommend you to do that.. you can try at your own risk.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
|
I have a question regarding calling web services from client side. You see the company I work for hosts sites in every version of asp - asp.net, and we have to work on a just about all of them. This makes something simple like sending form data to an email address a little bit of a pain. For /Net 2.0 I always use the System.Net.Mail Namespace, for 1.0/1.1 we have some 3rd party dll, and for classic asp we have some dinosaur code that is creating a COM object that seems to break all the time.
Now that I have used them all great, but for newer developers here it’s a pain... I won’t lie... It’s a pain for me too.
That’s when I thought, hey, why not build a web service and call it with JavaScript, then we could call it from any site with the same script. There is one problem with that though. It seems you have to use an XmlHTTPRequest which will not work cross domain. The thing is, in this case I really don’t care if it’s all, asynchronous and fancy. I just want it to work reliably.
Does anyone know a better cross platform solution?
Thanks,
-Adam N. Thompson
|
|
|
|
|
AdamNThompson wrote: Does anyone know a better cross platform solution?
Well, here's what i've done: code up a simple app that'll accept POST requests and do something useful with them. Then POST to it from whatever needs it. And FWIW, even classic ASP can use ServerXMLHTTPRequest to do cross-domain requests server-side.
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
Hi,
I have a problem for 2 days already when accessing my asp.net page that has an image(jpg). Why is it when I access one of the pages that I made the image(jpg) doesn't show up? But when accessing it thru another pc the image will display. I only have Avast anti-virus which I know this doesn't affect the image problem, unlike in Symantec Anti virus it has so many things to block and unblock.
What do you think is the problem why does the image(jpg) in of my pages doesn't show up in some of the pc using IE, Firefox, Safari and Opera. Or is there a need to add somewhere in my asp.net source code?
Thanks
hifiger2004
|
|
|
|
|
Do you have an adblocker running on some of the browsers?
|
|
|
|
|
I temporarily removed my anti-virus and turning off the browser's pop-up blocker, but still no luck
hifiger2004
|
|
|
|
|
Hi Johnny,
I solved it already. It's a very basic thing and my mind fly so high already hehe. You know what is the problem, it is because of the Image folder restriction.
Anyway thanks for the suggestion about the adblocker. I actually looking on that issue also as well as my anti-virus.
Thanks
hifiger2004
|
|
|
|
|
i hope that the problem is with ur browser expecially with ur pop-up.When pop-up get blocked possibility of images being displayed is less.Try changing the setting in the browser and proceed.Good LUck
|
|
|
|
|
Hi,
How i can do for stying in same page whem an user click in forward button in him browser.
Tanks
|
|
|
|
|
Don't cache any of your page.. then, there won't be no "back" button or "forward" button.. This is the easiest way to do.. If you are good in Javascript, you can take a look at Javascript Library about how to trick the "Back" button or "Forward" button..
Hope it helps.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
Follow these three steps (in order!):
- Write your own browser (complete with a forward button).
- Don't attach the button to any code that would actually do anything.
- Force all potential users of your website to use your browser.
...or, you know, try one of those dodgy javascript hacks. You know, the ones that have turned The Web into a minefield of unusable sites? If you like being responsible for unusable sites, that is...
---- ...the wind blows over it and it is gone, and its place remembers it no more...
|
|
|
|
|
After publishing my website, when I am trying to run my published application from IIS I am getting the following error..
"unrecognized configuration section 'connection strings'"
in web.config file.
how to resolve this problem ? plzzz I need ur help in this regard.
thank u all,
kiran
|
|
|
|
|
It is most likely that the virtual directory in which the website is contained is configured for ASP.NET 1.1. Try changing it to 2.0 .
|
|
|
|
|
Can anyone recommend a good, brief, introduction to OO in JS available on the web? I'm asking here instead of Google because I'd like to know that somebody has read and benefited from a resouce before dedicating precious time to it.
Calling all South African developers! Your participation in this local dev community will be mutually beneficial, to you and us.
|
|
|
|
|
|
Resources for Object Oriented Javascript
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
"Please vote to let me (and others) know if this answer helped you or not. A 5 vote tells people that your question has been answered successfully and that I've pitched it at just the right level. Thanks."
|
|
|
|
|
I would like to be able to only show the Title: textbox and hide all other
textboxes in the Appearance dialog box. Is this do able. If so is it done
with overrides to the RenderEditorPart and/or RenderPartContents members?
thanks
|
|
|
|
|
Hell to all,
I have an html form that takes orders and I would like a script to update the Total field before that form is processed and sent to the DB.
Right now, I am having the users enter the total manually.
Here's my form:
***************************************
Tamales type and quantity | Doz Pork : | | | Half Doz Pork : | | Doz Chicken : | | | Half Doz Chicken : | | Doz Chesse : | | | Half Doz Chesse : | |
***************************************
I then have another text input field that I want to automatically updated with the total based on the orders entered above.
any help will be appreciated. Thanks!
__TlaloC__
|
|
|
|
|
what is your formula to calculate the total?
on button onclientclick you can do the following in javascript (something like this):
<br />
function calculateTotalAndSubmit()<br />
{<br />
document.getElementById('total').value = parseFloat(document.getElementById('fld1').value) + <br />
parseFloat(document.getElementById('fld2').value) + parseFloat(document.getElementById('fld3').value);<br />
return true;<br />
}<br />
-----
|
|
|
|
|
Hi,
I need to modify this Jscript to not use a permanent filename but one based on the sessionID, I have the sessionID stored in a hidden field. I need help with the script.
EXAMPLE name
"../captchaTmpWavs/wszgplebmgb5tiytzxnlof55.wav"
//ASPX page
//Code behind
private void Page_Init(object sender, System.EventArgs e)
{
// Hidden field
txtStoreSessionID.Value = this.Session.SessionID;
}
|
|
|
|