Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On pressing link nothing happens #78

Open
JohnFishGerald opened this issue Apr 11, 2018 · 7 comments
Open

On pressing link nothing happens #78

JohnFishGerald opened this issue Apr 11, 2018 · 7 comments

Comments

@JohnFishGerald
Copy link

JohnFishGerald commented Apr 11, 2018

Hello,
This is my first time using github. I'm a good HTML and CSS code writer. A above average writer of PHP and MySQL. I'm using this code to be able to create a downloadable PDF.
I've read all the text and when i click on the link for download.... nothing happens.

This is my code:
<body id="Usage">
<div style='width:500px;height:500px;background-color:yellow'>
<h1>Say Hello</h1>
<a href="#" onclick="return xepOnline.Formatter.Format('Usage', {pageWidth:'216mm', pageHeight:'279mm'});">
Click Here
</a>
</div>
</body>
<script src="http://www.cloudformatter.com/Resources/Pages/CSS2Pdf/Script/xepOnline.jqPlugin.js">
</script>
</html>

(Note: I've got the header info in place. I just didn't copy it across to show you)


I've set this up locally. I've put it in on my localhost too and saved the file as .php. I've put it online on some hosting i have (Which is shared). But it doesn't matter what i do it just won't do anything when i press 'Click Here'.

Please help.

@kbrown01
Copy link
Contributor

Do not print the body. Put a child div in and put the id on that div.

@JohnFishGerald
Copy link
Author

Thank you for coming back to me this is so much appreciated. I've tried that and nothing. But Thank you anyway

@kbrown01
Copy link
Contributor

It depends on where you are formatting, take this sample: http://jsfiddle.net/w1rpjxoe/33/

You will note that I changed the render mode to download. You are possibly getting a popup blocking error you do not even see. The above works fine.

@kbrown01
Copy link
Contributor

You must set that on JSFiddle or it blocks the result, download is the only method

@JohnFishGerald
Copy link
Author

JohnFishGerald commented Apr 11, 2018 via email

@JohnFishGerald
Copy link
Author

JohnFishGerald commented Apr 11, 2018

Hello,
Sorry i went off line I had to pick up my wife from the airport. I'm back now.
Thank you for your time on this. I went into the jsfiddle link and i see what you have done with my code I click on the link and great it downloads brilliant. So i take on board what you have done ive even just copied the code and inserted in my page. Viewed it on a browser clicked the button .... and nothing. I also put it online on some server space i've got and... nothing. It makes sense how you mentioned that it could be my browser that is blocking the download and i can't even see that. But when i click on your link to what you have done in jsfiddle it works fine.. Am I missing some other code or something? Its bizzare? If you have any more thoughts that would be very much appreciated. Kind Regards John

@JohnFishGerald
Copy link
Author

I just wondered if anyone had any thoughts on this please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants