0

This should be pretty simple but I am having an issue.

I have a sidebar that is included into every page we have in our website. Now those pages can sometimes be found in different folders, so that poses an issue. When you are on index.php and fill out the form on the page, it directs you to the correct path.. But if you are in, (fictional folder title for clarity,) password/index.html that sidebar cannot link to the proper file to send the user upon form completion.

Here is my code:

 form name="sms_signup" method="post" action="text_alerts_thank_you.html" onSubmit="return ValidateForm();" target="_self" style="padding-bottom:25px;" class="form-horizontal">

What I need to know is, how do I tell HTML o go to the root of the directory and then access the file?

Thanks!

feeela
  • 29,399
  • 7
  • 59
  • 71
Pixel Reaper
  • 265
  • 5
  • 17

2 Answers2

3

Start the action with a "/":

<form name="sms_signup" method="post" action="/text_alerts_thank_you.html" onSubmit="return ValidateForm();" target="_self" style="padding-bottom:25px;" class="form-horizontal">
Nathan Loding
  • 3,185
  • 2
  • 37
  • 43
0

You may have to look at displaying the path correctly within the "action" input.

See this question for more information on paths. HTML - pick images of Root Folder from Sub-Folder

Community
  • 1
  • 1
MikeHolford
  • 1,851
  • 2
  • 21
  • 32