Go Back   Volusion Review Forums - Get the Most from your Online Store > Volusion Forums > Tips & Tricks
User Name
Password Register
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2008, 07:33 AM
OHOH OHOH is offline
Member
 
Join Date: May 2007
Posts: 59
Default Need Javascript help for constant contact link

I explained how I redirected email preference links to constant contact for my v4 store in another post. Now I am working on making a constant contact link for mail_subscribe.asp and mail_unsubscribe.asp for my v5 store.

I discovered that you can't do redirects on existent pages so I have used article 81 to close the current table above the volusion form and open a new one with a div tag with a style="display:none" attribute as follows

Article 81 body:

My text about subscribing
then
My link to Constant Contact
then

</td></tr></tbody></table>
<table><tbody><tr><td>
<div style="Display:none">
<table><tbody><tr><td>

this works fine to hide the Volusion form BUT I have open table and div tags

I need to modify the footer area of my template with javascript if clause that says if the file being loaded is like "mailing*" then

before the rest of the footer code put the following html

</td></tr></tbody></table>
</div>
</td></tr></tbody></table>

(something like that)

Any help will be useful to a lot of us I think.

I have found this code to parse the file name

//get path value (including file name)
var fileAndPath = filePath.value;

//find the index of the last "\"
var lastPathDelimiter = fileAndPath.lastIndexOf("\\");

//get everything after the last "\"
var fileNameOnly = fileAndPath.substring(lastPathDelimiter+1);

but I don't know javascript well enough to construct the if clause using the above parsing for comparison and then executing the html if the filename is "mailing*"

Thanks
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +0. The time now is 10:29 AM.