I need to create function to create advertisement here: http://www.motosale.com.ua/?add=zap
In this adv. should be image.
I have decided to create QWebView and insert each field by javascript. But i can't insert file.
How can i do that?
self.webView.page().mainFrame().evaluateJavaScript("document.getElementsByName('model_zap')[0].value='57'")
I did inserting values to inputs in that way
Maybe to try with QGraphicsWebView() instead of QwebView() ?
Related
I want to create object tag via JavaScript and load a url in it.
I am trying this way but its not creating object tag.
var object=document.createElement('object');
object.setAttribute('data','http://www.google.com');
object.setAttribute('width','90%');
object.setAttribute('height','90%');
document.body.appendChild(object);
Please see and suggest any possible way to do this
Thanks
I need to create image chart dynamically as shown bellow,
First I tried with php ImageCreate but it is hard to manage the space with that.
Then I tried the html5 canvas and that is also having a same issue. What I need to know is whether there is an easy way to do html to image conversion. Then I can manage the space easy with other styles.
Thanks in advance.
With wkhtmltoimage you can convert HTML to an images. You would need a VPS to run it on though. You can then create the HTML and call wkhtml2image via PHP to convert the given HTML to an image.
I am creating dynamic image with php with `GDLibrary. Here is the script of creating dynamic image.
I want to use the charts created in charts.js with MPDF but it doesn't seem to be recognising the Javascript elements, do you know if there is anything additional you need to add.
If MPDF cannot render Javascript do you know any other HTML to PDF converter in PHP that will work?
Better make charts in PHP using https://phpchart.com/. if you want to show it in a pdf. javascript looks and style does not work in PDF anyway.
Is there a way to generate a PDF file in JavaScript out of a given rendered and styled element of a webpage and its content? Is there already a library for this?
I've never put it to use, but could https://github.com/thebluber/htmlToPdf be what you're looking for?
There is a library called jsPDF. It provides basic functionality to create PDF documents. It even comes with a plugin to add elements from basic HTML.
i have a vb.net GUIform that will display an AxWebBrowser to show a html table which have some interactive controls that required javascript to work.
I already prepared the javascript with the valid functions.
Example:
Inside AxWebBrowser have a button, when i pressed the button, it will display the current time inside the AxWebBrowswer.
Is that possible to do this? and how? Just place the .js file in the same place and set the src equals to the .js file path? but it seems not work.
And after several tried, i found maybe JScriptCodeProvider can do this. but i no idea how to point the src to the jscript running in memory.
Please help
The easiest way to do this is to include the javascript with the html via a <script> tag, paste the entire script inline rather than using src="..." if you need to.