iframe Onload Visibility - iframe

I am trying to hide an iframe until it is loaded by I keep getting an error with the following code:
jquery("some stuff">.html("<iframe frameborder='0' vspace='0' hspace='0' marginwidth='0'
allowtransparency='true' scrolling='no' marginheight='0'
style='visibility:hidden;' onload="this.style.visibility='visible';" width='600'
class='frm'></iframe>").appendTo('body');
But it returns an error "syntax error this.style.visibility".
Can anyone help ?
edit:fixed spelling but now get the error
'missing ) after argument list'

You have a typo. Should be
this.style.visibility='visible';

required exit quotes \ and \
onload=\"this.style.visibility='visible';\"

Related

file_get_html() not working for the only webpage

I want to call a simple DOM file
I tested with another links and it works, but with this url it's not working.
My code is:
$bnadatos = file_get_html("http://www.rofex.com.ar/cem/FyO.aspx");
foreach($bnadatos->find('[#id="ctl00_ContentPlaceHolder1_gvFyO"]') as $i){
echo "datos:";
echo $i->innertext;
}
Response is a blank page.
What's wrong?
i solved with
$arrContextOptions=array(
"ssl"=>array(
"verify_peer"=>false,
"verify_peer_name"=>false,
),
);
$response = file_get_html("https://www.rofex.com.ar/cem/FyO.aspx", false, stream_context_create($arrContextOptions));
foreach($response->find('[#id="ctl00_gvwDDF"]/tbody/tr[2]/td[2]') as $i){
echo $i->innertext;
}
thank you #maio290 for light my road
This is just a guess, but do you have your error reporting on?
Out of the box, this is not working with the simple-html-dom library:
Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /var/www/html/dom.php on line 83
Warning: file_get_contents(): Failed to enable crypto in /var/www/html/dom.php on line 83
Warning: file_get_contents(http://www.rofex.com.ar/cem/FyO.aspx): failed to open stream: operation failed in /var/www/html/dom.php on line 83
Fatal error: Call to a member function find() on boolean in /var/www/html/test.php on line 11
A fix for this can be found here - with that in place, I still get a blank page, which is due to a wrong answer (301 Moved Permanently) - for this to fix, you need to modify
'follow_location' => false
to
'follow_location' => true
so, now we get the proper site content - you can modify the selector to $html->find('#ctl00_ContentPlaceHolder1_gvFyO'); this will find all element which id=ctl00_ContentPlaceHolder1_gvFyO - see the documentation as reference.

blackhole attack splittingobject error

i too have same problem.
please provide a clear solution for me...
following error is obtained when i run blackhole.tcl file.
ns: _o108 blackhole:
(_o108 cmd line 1)
invoked from within
"_o108 cmd blackhole"
invoked from within
"catch "$self cmd $args" ret"
invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
(procedure "_o108" line 2)
(SplitObject unknown line 2)
invoked from within
"_o108 blackhole"
Valid examples for the "2005-2013 blackholeaodv code" are : blackholeaodv2005-examples-3-Aug2015.tar.gz
Link : https://drive.google.com/file/d/0B7S255p3kFXNUmJGd0ZyNUhvVFU/view?usp=sharing

How to add a background image inline style to link tag Rails

I just can't seem to get this right.
In my rails app I am using ActionCable, it has issues with sending over URLs in partials. To fix this I am going to let the CSS do the work of setting the image, only to allow the image to be set dynamically I am going to need to have access to the view hence the fact this has to be inline css.
.message
%a.message_profile-pic{ :href => "", {:style=>"background-image:url('avatar.png')" } }
I have an image called avatar.png in my app/assets/images directory just as a test. It's an empty a-tag for now but it will become a link_to once I sort out the profile sections of the app.
I am getting the following error:
SyntaxError - syntax error, unexpected ')', expecting =>
...nd-image:url('avatar.png')" } )}></a>\n #{
How do I set this? I am using Rails 5 rc1 and Ruby 2.3 with bootstrap.
Note:
I have also tried the new HAML syntax with the same result:
%a.message_profile-pic{ :href => "", style: {background-image: "url('avatar.png')"}}
Edit
Here is what better errors is showing me:
Full stack trace looks like this:
SyntaxError - syntax error, unexpected ')', expecting =>
...nd-image:url('avatar.png')" } )}></a>\n #{
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: unknown regexp option - a
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: syntax error, unexpected $undefined
));}\n </a>\n <span class='message_timestamp'>\n #{
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: syntax error, unexpected keyword_class, expecting keyword_do or '{' or '('
));}\n </a>\n <span class='message_timestamp'>\n #{
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:6: syntax error, unexpected $undefined
));}\n </a>\n <span class='message_timestamp'>\n #{
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected '}', expecting tSTRING_DEND
));}\n </span>\n <span class='m...
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: unknown regexp options - pa
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected $undefined
...n class='message_star'></span>\n <span class='message_conte...
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected keyword_class, expecting keyword_do or '{' or '('
...ge_star'></span>\n <span class='message_content'>\n #{
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:8: syntax error, unexpected $undefined
...<span class='message_content'>\n #{
... ^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: syntax error, unexpected '}', expecting tSTRING_DEND
));}\n </span>\n</div>\n", -2, f...
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: unknown regexp options - dv
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: syntax error, unexpected $undefined
));}\n </span>\n</div>\n", -2, false);::Haml::Util.h...
^
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: unterminated string meets end of file
/Users/ruberto/Personal/Projects/splat/app/views/messages/_message.html.haml:11: syntax error, unexpected end-of-input, expecting tSTRING_DEND:
You can do something like this:
:style => "background-image: url(#{image_path "avatar.png"})"
To find more about image_path.

Unexpected token ILLEGAL with dangerouslySetInnerHTML

I am using Symfony2 framework with reactjs for view part. I have a twig variable having html tags.
So I did this - <span {{"dangerouslySetInnerHTML={{__html: ' "~content|raw~" '}}"}}></span>
But this is giving me following error
Error: Parse Error: Line 95: Unexpected token ILLEGAL
at http://localhost/url/abcd
... ouslySetInnerHTML={{__html: '<p></p><p&g ...
When I write something like <span {{"dangerouslySetInnerHTML={{__html: '<div>abcd</div>'}}"}}></span> , Then everything works fine. But when I use a twig variable, this error is thrown.
I would recommend using twig only to output your delimiters and the variable itself:
<span dangerouslySetInnerHTML={{ '{{' }}__html: '{{ content|raw }}' {{ '}}' }}></span>

WordPress Notice "Undefined Index"

I am getting following notice in WordPress
Notice: Undefined index: _wpnonce in /var/www/vhosts/abc.biz/php/func.php on line 338
Any solution?
Thanks for help
I found the solution, have to use isset() to check _wpnonce value, before comparing it.
if ( isset($_POST['_wpnonce']) && $_POST['_wpnonce'] = '123456789' ) {}
Thanks.

Resources