1 of 2
1
Place image button sending me to home page. 
Posted: 29 July 2008 04:48 PM   [ Ignore ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

When I click on the File Upload link in the SAEF then the photo-upload template pop-up as it is supposed to. I choose a file and click upload and it does get uploaded , i do see all the images in the desired folder.

But then I click on the Place Image and Close Window link and it refreshes and goes back to my main homepage URL and nothing gets placed into the field in the SAEF.

Any help/advise with this would be GREATLY appreciated.

Profile
 
 
Posted: 30 July 2008 07:43 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Do you have the correct path to the File Placement template? smile

By default, the example code uses:

return="popups/file_upload_placement"

Is that the name and path to your Placement template? smile

 Signature 
Profile
 
 
Posted: 30 July 2008 08:07 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

No i don’t have that in my file placement template.
This is what i have.

{exp:file_upload:upload_confirm field_replace="replace"}

<p>File sucessfully uploaded!</p>
<
input type="submit" value="Place Image and Close Window" onclick="fileplacer();window.close();" />

{/exp:file_upload:upload_confirm}

I will add that and see if it works.

Profile
 
 
Posted: 30 July 2008 08:09 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Yes, but I was referring to you Upload template…

 Signature 
Profile
 
 
Posted: 30 July 2008 08:12 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

oh..lol

Well yes i do have the correct path to the placement template in my upload template.

Profile
 
 
Posted: 30 July 2008 08:19 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Oops, sorry LOL

It also didn’t click in that the File Upload PLACEMENT page was loading for you (I thought that page was loading the homepage.... yet you clearly described the problem rasberry

Have you included the {javascript} variable in your Placement template? smile

 Signature 
Profile
 
 
Posted: 30 July 2008 08:25 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

Yes
I have the {javascript} variable in my head tag on the file placement template.

Everything is working it’s just redirecting to the homepage. Instead of closing and placing the image like it suppose to.

Profile
 
 
Posted: 30 July 2008 08:34 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Hmmm… which browser are you using? smile
Does it happen with other browsers?

 Signature 
Profile
 
 
Posted: 30 July 2008 08:39 AM   [ Ignore ]   [ # 8 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

I’m using firefox and i just tested it in IE6 and got the same result.

Do you think it would help if you saw my upload code?

Profile
 
 
Posted: 30 July 2008 08:51 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

Yes smile

 Signature 
Profile
 
 
Posted: 30 July 2008 08:58 AM   [ Ignore ]   [ # 10 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

Ok well here is my SEAF code:

All Fields Required<br><br>
{if logged_in}<p>Hey{screen_name} </p>
{/if}

{exp
:weblog:entry_form weblog="submisson" return="graphembed/fileplace" }
<p>Title<br />
<
input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" onkeyup="liveUrlTitle();" /></p>

<
p>URL Title<br />
<
input type="text" name="url_title" id='url_title' value="{url_title}" maxlength="75" size="50" /></p>

<
p><Upload Art Work</p>


<
br/>
<
p>Photo</p>
<
input type="text" name="myimage" value="{myimage}" /> 

<
p><input type="submit" name="submit" value="Submit" /></p>

{/exp:weblog:entry_form}

And this is my Upload template

<div>
 <
h1>Upload you artwork</h1>
 
{exp:file_upload:upload_form form_name="entryform" destination="Graphtastic images" field_name="myimage" return="graphembed/fileplace" rename_duplicates="yes"}

<p><input type"file" name="userfile" /></p>
<
input type="submit" value="Upload"/>

{/exp:file_upload:upload_form}     

</div>

And this is my placement template

{javascript} 

 
</head>

<
html>
<
body>
{exp:file_upload:upload_confirm field_replace="replace"}

<p>File sucessfully uploaded!</p>
<
input type="submit" value="Place Image and Close Window" onclick="fileplacer();window.close();" />

{/exp:file_upload:upload_confirm}

Everything seems correct but i may be wrong?

Profile
 
 
Posted: 30 July 2008 09:07 AM   [ Ignore ]   [ # 11 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

I believe your SAEF form should have this parameter:  smile

form_name="entryform"

You probably also don’t need the variable in this code:

Change from:

<p>Photo</p>
<
input type="text" name="myimage" value="{myimage}" />

to:

<p>Photo</p>
<
input type="text" name="myimage" />

Your Placement template head area is also a little bunged up LOL

 Signature 
Profile
 
 
Posted: 30 July 2008 12:58 PM   [ Ignore ]   [ # 12 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

Ok i made all the correction and it’s still not posting my image code in the designated field nor is the popup window closeing.
Is there a reason why my code isn’t making the window close?

Profile
 
 
Posted: 30 July 2008 01:34 PM   [ Ignore ]   [ # 13 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

Pie Man,

I FIGURED IT OUT!!!!!

THANKS FOR ALL YOUR HELP!!!!

Profile
 
 
Posted: 30 July 2008 01:36 PM   [ Ignore ]   [ # 14 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3356
Joined  2006-10-18

What was the problem? rasberry

 Signature 
Profile
 
 
Posted: 30 July 2008 02:05 PM   [ Ignore ]   [ # 15 ]
Newbie
Rank
Total Posts:  16
Joined  2008-07-26

I changed my field name to the field id number instead of the short name. I don’t know why but that worked.
The reason why it keep returning to my homepage because it was a failed upload. So by default it was returning to the homepage because there was no where to place the image.

<p><Upload Art Work</p>
<
input type="text" onclick="setFieldName(this.name)" size="30" maxlength="500" value="" name="field_id_11" dir="ltr"/>

Profile
 
 
   
1 of 2
1