/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] JQuery Kicking Off A Function

I’m new to JQuery, but I feel I can grasp it pretty quick with the help of a few boosters. ? I’m using this script that creates a dialog box on my site for my form field. Now I want to load some value into the form after the form loads in the dialog box. I feel that I have the correct code to do so, but I’m having issues kicking off the function.

[code]

jQuery(function ($) {
var contact = {
message: null,
init: function () {
//code that loads the form field in the dialog box
onOpen: contact.foo,
onClose: contact.fooagain
},

foo:function() {
[B]contact.readyFields[/B]; [I][U]//this is where I’m calling my function[/U][/I]
},

readyFields:function() {

//code that loads additional form default values

}

contact.init;

});

[/code]

With the part highlighted in bold, Firefox reads that “readyFields” is indeed a function but for some reason it doesn’t initiate. Any suggestions?

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ChuckBauthorApr 05.2013 — Nevermind. Solved it. It was suppose to be content.readyFields[B]()[/B]
×

Success!

Help @ChuckB spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.8,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...