It will be host to different businesses - each of which will have an identical email form
When an email is sent, I need to know which business the email is for
To identify a business, I first started by simply reading the directory name - I wrote a few lines of Javascript to strip out characters and capitalise to give the correct name
This worked great. I tested many times. Perfect
Except recently I stress tested a little more - the code doesn't work
Problem: when a user chooses one business and sends and email, all is fine. But then if they navigate to another business, the email that is sent STILL has the previous directory name :(
Different problems occur if the user enters the app anywhere other than the main index.html page
So, I tried a less clever solution: create a variable in Javascript and pass this as the business name
Problem: similar problems occur. So, I will have 2 businesses. Each will have the same email.html file - the only difference being the variable declaration giving the name of the shop in Javascript. The second shops email form send the same shop name as the first :(
I assume this has to do with how jQueryMobile works?
Is it possible for me to have 100 different shops - and 100 different email forms?
I have 3 further options to try:
- Use a hidden field (I'm having trouble identifying the form element - but I'll get there in the end)
- Pass the name of the shop on the command line when calling the email file
- Force a fresh load of the email page - I really don't want to do this - but I guess I'll have to do if I have to
EDIT: I just thought of another solution, name the files differently - so one is called shop-a-email.html shop-b-email.html
Can someone give me a pointer to twitter feed code?
I've google and have come across on good tutorial - this is 1+ year old
Just wondering if there was anything else recommended?
And Pinterest - any recommended code samples would be great - I haven't yet had a chance to research this one - would rather just go on a recommendation
From what I've read ONLY the JS code input in the first entry page gets read (this doesn't necessarily have to be the front page)
All other includes in other files are ignored
But, what if you have sub directories and HTML code in those?
The include of the JS will be a different path
Does this cause a problem?
In PHP for example if you were relying on the path and self referencing in some way, then the code would be different depending on your sub directory location
I think I'm developing a great app - looks great + has a few features that add an extra special touch
When completed, I want t shout out to the world and tell everyone about it
After posting on this forum... I wanted to submit to jqmgallery.com (amongst other things)
On their website they say, if you use any of the standard themes: then heck you can just forget about it, pack your bags and just go home (or something to that effect!)
What's wrong if I use the standard theme??
Surely what matters is what the content is that goes in between???
Am I missing something?
Or am I forced to create a unique *never* seen before gradient for the header??
If I have a page that is 3 levels down, say, and that page needs an extra script - according the what I understand from what I have read in scripting pages, the page won't get loaded??