HTML of Search post in Heading.......Not Working :|

  • 2
  • Question
  • Updated 7 years ago
I am trying to put the search post button in heading but when I Preview my site and click on it so it refreshes the page while I want it to search the page, And when I put the HTML in html widget so it work, Please help me why it is not searching in heading place.

Heading Html

#logo h1 { padding-top: 2px;
<!-- onclick="javascript:doSearch();" -->
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
  • Confused

Posted 7 years ago

  • 2
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Hello Technology Press,

Please could you put the HTML Code in <!--- for the start and ---> for the end on this forum so that the forum knows not to try and run the code.

Also, please could you share your URL so that we can investigate further,

Andi
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
My site link currently unpublish so just check out the HTML Below.

<!---<img id="I1085_img" src="resources/New_Banners/New%20Banner%20copy.png" style="width:240px; border:none;"><style type="text/css"> #logo h1 { padding-top: 2px; </style><script type="text/javascript"> //<![CDATA[ function doSearch49(){ if(document.getElementById('blogSearchText49').value == ""){ return false; } if(document.getElementById('blogSearchText49').value == "Search Posts"){ return false; } var tmp = escape(document.getElementById('blogSearchText49').value); tmp = tmp.replace(/</, '%3C'); tmp = tmp.replace(/>/, '%3E'); tmp = tmp.replace(/"/, '%22'); document.getElementById('fsearch49').action = 'index.search?q=' + escape(tmp); document.fsearch49.submit(); } function checkKey49(e){ var key = e.which||e.keyCode; if(key==13){ document.getElementById('btnBlogSearch49').click(); } } function doClear49(){ if(document.getElementById('blogSearchText49').value == "Search Posts"){ document.getElementById('blogSearchText49').value = ""; } } function updateSubmitAction49() { var tmp = escape(document.getElementById('blogSearchText49').value); tmp = tmp.replace(/</, '%3C'); tmp = tmp.replace(/>/, '%3E'); tmp = tmp.replace(/"/, '%22'); document.getElementById('fsearch49').action = 'index.search?q=' + tmp; } //]]> </script> <div class="sys_txt"> <div id="I_Blog_Search"> <form method="POST" id="fsearch49" name="fsearch49" action=""> <label for="blogSearchText"> <input type="text" class="text" onkeydown="javascript:updateSubmitAction49(); checkKey49(event);" onfocus="javascript:doClear49();" onclick="javascript:doClear49();" name="blogSearchText49" id="blogSearchText49" value="Search Posts"> </label> <!-- onclick="javascript:doSearch();" --> --->
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
Check out the image
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
So your issue is that it is not in the right place?

If so, please could you attach a screenshot of the page in the SiteBuilder please.

To show a screenshot here, you need to take the screenshot, copy into Paint or a similar program, upload to your file manager. Then use the following code: (without <!--- and --->) - or just the link to the image.

Andi
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Okay, so what exactly is your issue?
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
my issue is that when i click on Search post text box or on button so it refreshes the page
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
Do you want this screen shot
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
That has helped, did you use the exisiting Yola Blog Search Widget or did you use Custom HTML?

What exactly is your issue, are the search results not displaying there? Are they not showing at all?
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
I have used the following HTML which is the code of Yola blog search i had take it from source code to add it to Heading place my problem is that the search is placed in it place but when i search anyting so the page refreshes

<!---<img id="I1085_img" src="resources/New_Banners/New%20Banner%20copy.png" style="width:240px; border:none;"><style type="text/css"> #logo h1 { padding-top: 2px; </style><script type="text/javascript"> //<![CDATA[ function doSearch49(){ if(document.getElementById('blogSearchText49').value == ""){ return false; } if(document.getElementById('blogSearchText49').value == "Search Posts"){ return false; } var tmp = escape(document.getElementById('blogSearchText49').value); tmp = tmp.replace(/</, '%3C'); tmp = tmp.replace(/>/, '%3E'); tmp = tmp.replace(/"/, '%22'); document.getElementById('fsearch49').action = 'index.search?q=' + escape(tmp); document.fsearch49.submit(); } function checkKey49(e){ var key = e.which||e.keyCode; if(key==13){ document.getElementById('btnBlogSearch49').click(); } } function doClear49(){ if(document.getElementById('blogSearchText49').value == "Search Posts"){ document.getElementById('blogSearchText49').value = ""; } } function updateSubmitAction49() { var tmp = escape(document.getElementById('blogSearchText49').value); tmp = tmp.replace(/</, '%3C'); tmp = tmp.replace(/>/, '%3E'); tmp = tmp.replace(/"/, '%22'); document.getElementById('fsearch49').action = 'index.search?q=' + tmp; } //]]> </script> <div class="sys_txt"> <div id="I_Blog_Search"> <form method="POST" id="fsearch49" name="fsearch49" action=""> <label for="blogSearchText"> <input type="text" class="text" onkeydown="javascript:updateSubmitAction49(); checkKey49(event);" onfocus="javascript:doClear49();" onclick="javascript:doClear49();" name="blogSearchText49" id="blogSearchText49" value="Search Posts"> </label> <!-- onclick="javascript:doSearch();" --> --->
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Okay, can you try adding two column dividers to the top of the page. the first one should have the centre bar moved across to the far left hand side.

Then place the second column divider in the right hand section of the first column divider. Then, add a Yola Search Widget into the second column divider and set the margins of the second column divider to about -100.

Please also remove the current one that is on there.

Check to see if this works.

Andi
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
There is only +100 not -100
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
If you physically type -100 it will work.
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
It also not type physically
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
What browser are you using? Chrome 10 by any chance?
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
How did I guess? It is a bug with Yola that Chrome 10 does not allow the margin editor to work, for me it will only let me type 0 and 9's!

Use Firefox for the margin editor, Yola are working on the bug at the moment.
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
Yes
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
Thanks i did it on Safari browser, Thanks, Yola is the BEST
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Could you send an email to support@yola.com explaining the issue you had with Chrome 10, what it was doing wrong - the more info they get, the quicker they can find the solution!

Thanks, Andi
P.S. Glad it worked!
Photo of Nazlie

Nazlie

  • 1721 Posts
  • 51 Reply Likes
Thanks for helping out Technology Press here, Andi. Looks like the problem is resolved.

Yes, we are aware of the problem with manually adding margin values in Chrome. We hope to have this bug fixed soon!
Photo of Andi North, Mangopear Media

Andi North, Mangopear Media

  • 782 Posts
  • 111 Reply Likes
Thanks Nazlie,

I also hope this bug is fixed soon!

Andi
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
Actually the problem I was facing in Chrome 10 was that when I put - in Margin so it remove automatically but when I put - in margin while working through Safari so - remain in it place.
Photo of Technolology Press

Technolology Press

  • 80 Posts
  • 1 Reply Like
I have send mail to support@yola.com,
Thanks for you support

Regards
Syed Owais Ali Chishti