Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery
Izack Sher
Trigger the right event when a form opens on a page
in
Using jQuery
•
5 years ago
My problem is that I don't know what is the right event when a form opens on a page.
Specifically, my webpage is as follows:
http://pcgraph.triplebit.com/product/on1-jersey-unif/
When the visitor clicks the upper button (with the envelop icon) it launches a form.
I need to set a specific value to one of the fields with jQuery at that moment.
Is it possible and how?
Thx
1
Replies(6)
kbwood.au
Re: Trigger the right event when a form opens on a page
5 years ago
The envelope button triggers a
mailto:
link, which is handled by the browser without any JS interaction. You can specify additional fields on that link, such as the suggested subject and body of the email. See
https://en.wikipedia.org/wiki/Mailto
.
Leave a comment on kbwood.au's reply
Izack Sher
Re: Trigger the right event when a form opens on a page
5 years ago
Thx
In this case the button doen't send an email but pops up a form. Besides there is no way to target the field that I want to set in the Wikipedia doc.
If I'm wrong, can you be more specific and demonstrate with code?
Thx
Leave a comment on Izack Sher's reply
jakecigar
Re: Trigger the right event when a form opens on a page
5 years ago
jQuery(".product-info a:has('.fa-envelope-o')")
targets the
little
envelope (
צור קשר לקבלת פרטים) )
jQuery(".product-info a:has('.fa-envelope-o')").click(function(){
jQuery('[name="your-name"]').val("Jake") // puts my name in the input!
})
The large envelope at the bottom of the page is a mailto:
JΛ̊KE
Leave a comment on jakecigar's reply
Izack Sher
Re: Trigger the right event when a form opens on a page
5 years ago
Thx
Works...
Leave a comment on Izack Sher's reply
Izack Sher
Re: Trigger the right event when a form opens on a page
5 years ago
Dear Sir,
Your code works perfect but do you know why my similar code, with a slight change regarding the selector doesn't work:
$('i.acfi.fa.fa-envelope-o').click(function() {
$( ".product_cf7 input" ).val(product_name);
})
Thx
jakecigar
Re: Re: Trigger the right event when a form opens on a page
5 years ago
You don't have $ as jQuery.
And jQuery( ".product_cf7 input" ) does not match any element on your page.
JΛ̊KE
Leave a comment on Izack Sher's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to Izack Sher's question
Top
Reply
{"z2953500":[14737000007532061],"z33036343":[14737000007538016,14737000007538021,14737000007538023,14737000007542013],"z2950240":[14737000007533093,14737000007543035]}
Statistics
6
Replies
1353
Views
1
Followers
Tags
Cancel
form
Actions
Permalink
Related Posts
form
Form DOM
form
.load ("<form>lorem</...
Form
Form Builder