<a href="javascript:inventoryCheck_panel.open('paypalexpress');" class="button cta_button" data-btntype="hyperlink" data-btnname="cart_paypal" onclick="return runCMConversionEventTag({conversionCategory: 'Shopping Cart', conversionEvent: 'PayPal Checkout'})" title="Check Out with PayPal" id="cart_paypal_button" tabindex="6500"><span tabindex="-1"></span></a>

is this code but i need help to click on it..

click a button automatically when? on what event? the page load?

pixel Nevermind i figured it out but i need help running the click() with two different element Ids on the same page.

document.getElementById("add-to-cart").click()
document.getElementById("checkout").click()

please help if you can

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.