/    Sign up×
Community /Pin to ProfileBookmark

Dynamic options within a form jump menu – Javascript (Help Please!)

? I need some assistance if anyone can figure out what is going on here…

In the following line of code I would like to make the template ID dynamic so that I can access the “computers” group from any tmeplate on my site.:

<option class=”link” value=”http://myDevSite/scripts/ecatalogisapi.dll/Group?Group=21&Template=9990000105000999“> » Computers</option>

I have already written JavaScript to pull the template number from the URL string and it works just fine when used as follows:

<script>document.write(“<a href=’http://myDevSite/scripts/ecatalogisapi.dll/Group?Group=21&Template=” + GetTemplateId() + “‘ class=newsidebar>Computers</a>”);</script>

When I use teh above code on a template the GetTemplateId is nicely replaced with whatever template number is being displayed in the pages URL.

I need to be able to use GetTemplateId() in place of the static number in the html jump menu’s code I have shown above – I cannot get it to work.

Any help would be greatly appreciated…I am loosing my hair fast enough naturally…I can’t afford to continue pulling more of it out!

Regards,
photopro23 ?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @photopro23 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.18,
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,
)...