0

I have such code :

<iframe id="document_viewer" src="<TMPL_VAR docviewer_url>"></iframe>

The variable is PHP URL with pdf converted to text and embed in perl generated HTML using that iframe.

For SEO reasons i need to make it visible in page source , like it would regular text. Help will be truly appreciated.

simbabque
  • 53,749
  • 8
  • 73
  • 136
  • You need to print the variable to the code before you serve it to a client, are you prcocessing that variable in perl? – Clemens Himmer Mar 24 '16 at 12:28
  • Can you please [edit] your question and make it a bit more clear what you want? I think that you want to embed the source of the file behind the `docviewer_url` variable directly into your HTML without wrapping it in an iframe. So you would have to download that file and output its content. Is that what you want to do? – simbabque Mar 24 '16 at 12:41
  • I want to output that php file , sorry i can't add more info since i'm not coder :) here is my website landing page example : http://pdfcrawler.com/50vj1xhqyzd7/UWE_residents_handbook-free-isueu9hrrp.pdf.html – user2444409 Mar 24 '16 at 12:57
  • @ClemensHimmer, iframe executes php file and outputs it , but yes it's served last using – user2444409 Mar 24 '16 at 13:08
  • @simbabque I can't download and put file content since it i php and perl generated html won't parse it. – user2444409 Mar 24 '16 at 13:34
  • HTML cannot parse anything. You are not supposed to download the php file. But you can make Perl download the website that the php code on the server generates (doesn't matter if that is done by php or if it's a static file). That would be the same thing the user's browser does in the iframe. – simbabque Mar 24 '16 at 13:44
  • You really need to make an effort to describe your requirements or we cannot help you. I still don't understand what you want to do. That link only confused me more. – simbabque Mar 24 '16 at 13:46
  • 1
    @simbabque , alright lets leave it as it is , just simply can't tell more about whole mechanism , i'm internet marketer , not coder , i thought it will be easer. Thanks for trying me to help. – user2444409 Mar 24 '16 at 13:53
  • Fair enough. The key to finding this kind of thing if you're not a technical person in my experience is to try to be as precise as possible. But that's not always easy. I would struggle to find any specific SEO related stuff probably. ;) – simbabque Mar 24 '16 at 13:55

1 Answers1

0

something like this:

<script>
$('#buttonID').click(function(){
var value  = $('#document_viewer').contents().find('body').html();
$("#divID").load(value); 
});
</script>
SnakeFoot
  • 174
  • 3
  • 16
  • While this code may answer the question, it would be better to include some _context_, explaining _how_ it works and _when_ to use it. Code-only answers are not useful in the long run. – Benjamin W. Mar 24 '16 at 14:19