Access an object inside a partial

Hi Guys,
Please is there a way I can pass parameters to partial from javascript?

Below is my code sample

return coverImageDropzone.on("success", function(file, responseText)
					{
						var _this = this;
						var uploadError = $("#upload-cover-image-error");
						if(typeof responseText == "object")
						{
							if(!responseText.message)
							{
								uploadError.removeClass("alert alert-danger");
				                uploadError.html("");

				                //disable further upload of files
							    $('#cover-image').prop('onclick',null).off('click');
					            _this.removeAllFiles();

					            //proceed to review upload
					            stepThree.removeClass("tmm-current").addClass("tmm-success");
							    stepFour.addClass("tmm-current");
							    $("#sell-a-book-nav-icon-4").removeClass("add-nav-margin-black").addClass("add-nav-margin-white");
							    $(pageLoadingDiv).modal('hide');
							    $("#sell-a-book-form-holder").html("<%= j (render 'merchants/partials/sell_a_book_step_4') %>");
							}
							else
							{
								$(pageLoadingDiv).modal({backdrop: 'static', keyboard: false});
								setTimeout(function()
								{ 
									$(pageLoadingDiv).modal('hide');
                                    var filteredMessage = responseText.message.replace("File name", "Book cover image: ");
									_this.removeAllFiles();
					               uploadError.addClass("alert alert-danger");
					               uploadError.html(filteredMessage);
								}, 2000);
							}
						}
						else
						{
							_this.removeAllFiles();
				            alert("Unknown error, please try again");
						}
					});

Assuming the Javascript runs on the rendered page, realize the partial has already loaded.
So the short answer is NO.

Can you be a bit more explicit. What is the behavior you are trying to develop?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.