473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Javascript as response from ajax call

21
Here is my ajax call:

Expand|Select|Wrap|Line Numbers
  1.     new Request.HTML({
  2.                 url: 'users.html',
  3.                 method: 'get',
  4.                 update: 'go',
  5.                 evalScripts: true, /* !! Why isn't this working!? */
  6.                 onComplete: function(){console.log('ajax complete!')}
  7.             }).send()
I even check eval scripts!
users.html:

Expand|Select|Wrap|Line Numbers
  1. <label><h3>Save data here:</h3>
  2. <br />
  3. <section id="load" style="display:none;">
  4.         <img src="progress.gif" />
  5.     </section>
  6. <section id="log">
  7.     </section>
  8.     <table>
  9.     <tr><td>Data:</td><td>
  10.     <textarea id="texta" placeholder="Save here." wrap="off" autofocus></textarea></label>
  11.     </td></tr>
  12.     <tr><td>Are you human?</td><td>
  13.     <div id="cap">
  14.     <script src="http://api.adscaptcha.com/Get.aspx?CaptchaId=1049&PublicKey=ac589518-4f4e-4566-ae26-c37c0f535a17" type="text/javascript"></script>
  15.     <noscript><font color="red">Please enable javascript!</font></noscript>
  16.     </div>
  17.     </td></tr>
  18.     <tr><td>&nbsp;</td><td>
  19.     <input type="button" value="Go" name="submit2" id="start2"/>
  20.     </td></tr>
This is not executing:

<script src="http://api.adscaptcha.com/Get.aspx?CaptchaId=1049&PublicKey=ac589518-4f4e-4566-ae26-c37c0f535a17" type="text/javascript"></script>
<noscript><font color="red">Please enable javascript!</font></noscript>

What is the solution so the script will run?
Mar 28 '11 #1
6 2352
Dormilich
8,658 Expert Mod 8TB
is that call meant to be new (Request.HTML(…)); (current) or (new Request).HTML(…); ? those are different calls.
Mar 30 '11 #2
agam
21
I don't know the difference, but does it matter?
Because I also tried to use the other ajax functions and the script didn't run.
Mar 30 '11 #3
Dormilich
8,658 Expert Mod 8TB
yes, it does matter. when invoking an object with new, you have to use a constructor function. while I’m pretty certain that Request is a function I’m pretty certain that Request.HTML() (resp. its return value) is not, which makes the call new Request.HTML({…}); fail.
Mar 30 '11 #4
agam
21
So how can I implement it?
(like so?:)
Expand|Select|Wrap|Line Numbers
  1.              Request.HTML({
  2.                 url: 'user.php',
  3.                 method: 'get',
  4.                 evalScripts: true, /* this is the default */
  5.                 update: 'go',
  6.                 onComplete: function(){console.log('ajax complete!')}
  7.             }).send()
(it gives me an error.)
Mar 30 '11 #5
Dormilich
8,658 Expert Mod 8TB
what library do you use?
Mar 31 '11 #6
agam
21
I am using mootools.
(If you didn't see it before..)
Mar 31 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Grzegorz Smith | last post by:
Hi everyone. Does anyone know is it possible to check if ajax call was redirect? i mean I connect by Ajax to one URL but I'm redirected to other url. Is there a way to check that my request was...
1
by: robbi.st | last post by:
hallo, da ich nicht so gut bin in dem, wollte ich mal fragen ob es möglich ist, ein popup via javascript in ajax aufzurufen. bis jetzt ist es mir zwar gelungen, ein popup aufzurufen, jedoch...
2
by: Zeba | last post by:
Hi guys! I'm new to JS / Ajax; I've been trying to do an Ajax call to my Webservice ( I'm using C# for code-behind). I'm not using any of the libraries available. I am sending my CustID to the...
3
by: wendallsan | last post by:
Hi All, I've stumped myself writing an app that uses Prototype and a bit of PHP. Here is what I have: I have a custom class named Default_county_init_data that, upon initialization makes...
2
by: gaya3 | last post by:
Hi , can any one please say me how to retreive the array from another jsp thro' ajax call... <%@ include file="JspBean.jsp" %> <html> <head> <link rel="stylesheet" type="text/css"...
3
by: KDawg44 | last post by:
Hi, I would like a verification image for new sign ups on a website. Is there a way to call the PHP script through an AJAX call and have the image passed back and then display? Is there a way...
3
by: rbansalit | last post by:
Hi all I am making a very simple ajax call. But I am not getting any message from sever. <html> <body> <script type="text/javascript"> function ajaxFunction()
1
by: intermanch | last post by:
how call function php($varible) into javascript withod ajax: <!-- this code only call funnctions php but how call function php intermanch@gmail.com www.intermanch.blogfa.com
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.