Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

375
Views
How can I load an URL from a form-button instead of making and clicking a text-link?

I have

jQuery( "#art-calendar-"+infoModalType+"-event-link-url" ).html('<a target="_blank" href="'+calendarEvent.eventLinkUrl+'">'+calendarEvent.eventLinkUrl+'</a>');

in my .js file

and

<button type="button" id="button-1"  type="submit">  
                    Button that loads new page
                    </button>  

in .php file

How can I make a button with custom text, that, onclick, loads a new page instead of showing the url?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

This line had to go into the javascript file:

jQuery('#Termin').attr('action', calendarEvent.eventLinkUrl);

and the next three lines into the PHP file:

<form id="Termin" action="" method="post">
      <button type="submit">jetzt Termin buchen</button>
</form>

The jQuery command adds the calendarEvent + EventURL into the empty action-attribute of the form button called #Termin. This way, the form gets a dynamically produced URL that is being loaded, when clicking the button with the ID Termin.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!