• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Design Customization » Display file catalog entry form in pop up widnow
Display file catalog entry form in pop up widnow
Harina
Posts: 27
Reputation: 0

Message # 1 | 6:23 AM
I want it in pop up window and i have put it there...but the add button does not work
Code
<script type="text/javascript">
function openFormu(){
new _uWnd('contact','Search',400,150,{fadespeed: 666, fadeclosespeed: 666, fadetype: 2, fadeclosetype: 2,align:'left',footerc:' ',min:0,max:0,resize:0,closeonesc:1,autosize:1,shadow:1,topclass:'x-lightwnd',gridclass:'myWinGridBlack',modal:1}, $(".myformu").html() );
}
</script>
<div class="myformupload" style="display:none;">
    
     <?if($TITLE_FL$)?>
    <li><label for="title">$TITLE_SIGN$:</label>        <li>$TITLE_FL$         <li class="notcolumn"><hr /><li class="notcolumn"><?endif?>

    <?if($MESSAGE_FL$)?>
    <li class="notcolumn">$MESSAGE_FL$                  <li class="notcolumn">   <li class="notcolumn"><hr /><li class="notcolumn"><?endif?>
     
     
<input type="submit" style="display:none;" id="doSmbBt" /><input type="button" class="manFlSbm" id="ldF18" style="font-weight:bold;" value="Add" onclick="document.getElementById('doSmbBt').click();" />
</div>


and then i call it with this link

Code
<a href="#" onclick="openFormupload();return false;">Upload</a>
bigblog
node_modules
Posts: 1570
Reputation: 73

Message # 2 | 6:06 PM
i'm kinda iffy on this part of your code:
Code
onclick="document.getElementById('doSmbBt').click();"


try this instead:
Code
onclick="document.getElementById(\"doSmbBt\").click();"


some console output would be nice too (Ctrl/Cmd+Shift+J for chrome)

hey i'm joe and i do not work for the company anymore, sorry for the late replies
icon by Nathan Butler
Harina
Posts: 27
Reputation: 0

Message # 3 | 10:43 AM
Hmm didnt work either
Soldierdevil
Posts: 135
Reputation: 0

Message # 4 | 8:06 AM
Harina, You can use an iframe and call it with toggle show/hide in javascript
I hate politics, people who do not make an effort with people and those who try hard to be cool
Harina
Posts: 27
Reputation: 0

Message # 5 | 7:10 AM
Please tell me in detail. How can i achieve that
Soldierdevil
Posts: 135
Reputation: 0

Message # 6 | 4:43 PM
Harina, you need to first learn how to work around with iframes they might affect the way browsers index your website however you can do this. Go to the design management file catalog add page and delete everything there and post this code
Code
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Posting page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?$META_DESCRIPTION$?>
<?$META_KEYWORDS$?>
<!--[if lt IE 9]>
<script type="text/javascript">
var e = ("header,footer,article,aside,section,nav").split(',');
for (var i = 0; i < e.length; i++) {
document.createElement(e[i]);
}
</script>
<![endif]-->
</head>
    
<div class="frame">
$BODY$
</div>
    
<style>
.frame {max-width: 80%;
margin: 0 auto;
margin-bottom: 30px;}

@media only screen and (max-width: 500px){
.frame {
float: left;
min-width: 92% !important;
margin-bottom: 100px;}
}

.uadm--mini {display: none !important;}
  
body {
border: none !important;
background: #fff;
-webkit-box-shadow: none !important;
-moz-box-shadow: none !important;
box-shadow: none !important ;
}
</style>





$POWERED_BY$


And then go where you want to place the link to add entry to catalog and paste this code.

Code
<a id="file" href="#" >Upload file</a>
<div id="uploadfile" style="display: none; position: absolute; z-index: 99; margin-top: 10px;">
<div style="font-size: 0px; margin-bottom: 20px; margin-top: 20px;">
<iframe src="/load/0-0-0-0-1" style="height: 550px; width: 100%; border: 0; border:none; padding: 10px;" frameborder="0" />
<p>Your browser does not support iframes.</p>
</iframe>
</div> </div>

<script>
$('#file').click(function() {
jQuery(this).text('Close window');
if($('#uploadfile').is(':visible')){
jQuery(this).text('Upload file');
}else{
jQuery(this).text('Close window');
}
$('#uploadfile').slideToggle('slow');
return false;
});
</script>


I am sure it will do what you want so you can start from there and mind responsiveness on small devices.

I hate politics, people who do not make an effort with people and those who try hard to be cool
uCoz Community » For Webmasters » Design Customization » Display file catalog entry form in pop up widnow
  • Page 1 of 1
  • 1
Search: