Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesSubmit Form With AJAX and JS - Google VoiceSubmit Form With AJAX and JS - Google Voice
Previous
 
Next
New Post
9/8/2010 2:25 PM
 

I have created a module to interface with Google Voice(from now on GV). A quick note on for those unaware of GV: There is a GV widget made in flash that allows visitors to your website to click the widget, enter their phone number, click submit and GV will call their phone and then connect them to my specified phone number. With that explained, now let's continue.

I don't want to use the provided widget as there are currently no customization options. I have created a normal html form that submits to GV and works as desired short of a few things. Here is the code that submits and dials properly. The only unnacceptable part of this is that when the form is submitted it redirects to the submit page with "ok=true" I don't actually want the redirect. I would like it to stay on the same page and submit using AJAX.

Almost working example:

<input name="buttonId" id="buttonId" type="hidden" value="eb792b908ea8ef86648adb574ea6cb78c6bcb73c" /><br /><br />
<
input 
name="showCallerNumber" id="showCallerNumber" type="hidden" value="0" /><br /><br />
<
p><label>Your Phone Number<br 
/><br />
<
input name="callerNumber" id="callerNumber" type="text" 
/></label></p><br />
<
p><label>Your Name<br 
/><br />
<
input name="name" id="name" type="text" 
/></label></p><br /><p>
<
input 
onclick="this.form.action='https://clients4.google.com/voice/emb...';this.form.submit();" 
type="submit" value="Connect" /></p>


I am having to use javascript in the onclick event of the submit button to set the form action because I don't know any other way to get it to work with the way asp.net does not allow multiple server side forms. If anyone know a way around this as well, I would appreciate that input.

How can I post this using ajax in order stay on the same page?

Thanks,
Eric
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesSubmit Form With AJAX and JS - Google VoiceSubmit Form With AJAX and JS - Google Voice


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out