Skip to content Skip to sidebar Skip to footer

Javascript Passing Variable From Function To Function

How do i pass var rating and var itervalue into my window.location.replace? i get new rating variable from function updateRating() and when i click hireraccept, it assigns a new it

Solution 1:

You have your iterval declared globally, but then redeclare it locally. Remove the var declaration from your click handler and it will overwrite the global value, which you can then use in your dialog opening options.

// edit Change this

var itervalue = $(this).attr("value");

to this, and that should work

itervalue = $(this).attr("value");

Post a Comment for "Javascript Passing Variable From Function To Function"