[jQuery] Submitting a form with .submit() problems

2009-01-17 Thread g...@getsharepoint.com

Hi,

I have a form that looks like this:

tabletr
form action=http://jquery.com; method=post id=myForm
td
input value=submit type=submit onclick=conversion(1000, this);
return false; /
/td
/form
/tr
/table

The onclick call for the button accesses code which does some special
processing and then is supposed to submit the form. The form
submission looks like this:

jQuery(this.clickedObject).parent('form').slice(0).submit();

Problem is this won't work. I'm assuming it's because of malformed
xhtml (the form tag inside the tr) however the html itself can not be
changed but my JavaScript can.

Unfortunately I can not use the form's id to submit the form as there
are two malformed xhtml forms that run on the same code. Is there
another way to get to the form tag by traversing elements in reverse
order?

Any help would be greatly appreciated.


[jQuery] Re: Submitting a form with .submit() problems

2009-01-17 Thread g...@getsharepoint.com

Actually in this case parents('form') of the clicked object does not
include the form tag itself and I believe it's due to the poor html
structure. I just tested this out.

On Jan 17, 2:15 pm, Alex Kachayev kacha...@gmail.com wrote:
 If I undestood the task right, you can create code in such way.

 You form will be like this:

 tabletr
 form action=http://jquery.com; method=post id=myForm
 td
 input value=submit type=submit onclick=conversion(1000, this);
  /
 /td
 /form
 /tr
 /table

 Convertion(1000, this) will return:

 true, if it`s neccesary to submit form.
 false, in other case.

 For this question: 'Is there  another way to get to the form tag by
 traversing elements in reverse order? '.. But parents('form')
 returns reverse order...


[jQuery] Can I call a different domain using .ajax async=false

2009-01-14 Thread g...@getsharepoint.com

Hi,

If my code is on mydomain.com and I want to get some data from
yourdomain.com can I use .ajax with async=false or does .ajax always
do an XMLHttpRequest to get it's data?

I know I can't use XMLHttpRequest for cross-domain requests.

Thanks ahead of time.


[jQuery] getJSON problem - Urgent

2009-01-13 Thread g...@getsharepoint.com

Hi,

I've got a deadline to get a project working and I'm stuck with a
getJSON call problem.

Here's what's happening. Visitors come to a landing page on domain A
(domaina.com). All of the links and form submits on this page are
coded with a javascript call to a function which calls getJSON on a
completey different domain (domainb.com). The format of the onclick is
like this:

a href=page.html onclick=jsoncall(value);Go somewhere on Domain
A/a

The format of the getJSON call is like this:

jQuery.getJSON(http://domainb.com/logclick.php?value=; + value +
transaction= +transactionid);

where the value is the passed value and transactionid is an identifier
of the visitor to the page.

Problem is the logging of the click is intermitent. Sometimes it gets
logged and sometimes it doesn't. I'm sure this problem has to do with
my misunderstanding of how the onclick works. I had assumed that the
onclick would always complete fire before the link goes to the new
page. It seems as if this is not the case. Sometimes the getJSON
appears to be called and sometimes it doesn't. And, I need to make
sure ALL of those clicks get tracked somehow.

Any help woud be greatly appreciated. I'm hoping someone has run
across a similar problem.

Thanks so much,

Guy


[jQuery] Re: getJSON problem - Urgent

2009-01-13 Thread g...@getsharepoint.com

All of the links are hard coded. Someone on another board suggested I
use the click event handler instead. Problem is the links vary in
value so I'd probably have to wait until the document loaded then grab
anything with an Onclick attrib containing that code, remove the
attribute and attach the click event handler.

Thanks.

On Jan 13, 12:10 pm, brian bally.z...@gmail.com wrote:
 Are any of these links dynamically generated? That is, are any of them
 not in the page when its first loaded for the user? It may be a
 binding issue.

 On Tue, Jan 13, 2009 at 8:05 AM, g...@getsharepoint.com

 g...@getsharepoint.com wrote: