Display partial view in a main View - asp.net-mvc-4

Please I need to know how to display a partial view in a specific area in the main view , this is my source code
Main View: cshtml
<table align="left" border="5px" cellspacing="2px" style="border:2px solid black">
<tr>
<table>
<tr>
<td style="border:2px solid black">
<div style="background-color: #fff; border: 6px solid #ccc; height: 700px; width: 500px; margin: 20px; padding: 20px;" align="center">Select Baseline Image
<input type="button" value="Upload" align="right">
<div style="background-color: #fff; border: 6px solid #ccc; height: 500px; width: 300px; margin: 20px; padding: 20px;" align="center">#Html.Partial("_DisplayImage")</div>
</div>
<form method="POST">
<input id="leftUrlTB" name="URL" type="Text" style="background-color: #fff; border: 6px solid #ccc"/>
<input id="leftBrowser" name="leftBrowser" value="Firefox" type="radio" />Firefox<br>
<input id="leftBrowser" name="leftBrowser" value="Chrome" type="radio" />Chrome<br>
<input id="leftBrowser" name="leftBrowser" value="Internet Explorer" type="radio" />Internet Explorer<br>
<input type="submit" value="Capture" align="right">
</form>
</td>
<td style="border:2px solid black">
<div style="background-color: #fff; border: 6px solid #ccc; height: 700px; width: 500px; margin: 20px; padding: 20px;" align="center">Select Comparison Image
<input type="button" value="Upload" align="right">
<div style="background-color: #fff; border: 6px solid #ccc; height: 500px; width: 300px; margin: 20px; padding: 20px;" align="center"></div></div>
<form method="POST">
<input id="rightUrlTB" name="URL" type="Text" style="background-color: #fff; border: 6px solid #ccc"/>
<input id="rightBrowser" name="leftBrowser" value="Firefox" type="radio" />Firefox<br>
<input id="rightBrowser" name="leftBrowser" value="Chrome" type="radio" />Chrome<br>
<input id="rightBrowser" name="leftBrowser" value="Internet Explorer" type="radio" />Internet Explorer<br>
<input type="submit" value="Capture" align="right">
</form>
</td>
</tr>
</table>
</tr>
<tr>
<td >
<div style="background-color: #fff; border: 6px solid #ccc; height: 700px; width: 1100px; margin: 20px; padding: 20px;" align="center"></div>
</td>
the partial view code is this one :
<img src="#Url.Action("WebAppView")" />
And I got those controllers :
public ActionResult WebAppView()
{
return View();
}
[HttpPost]
public ActionResult WebAppView(string url, string selectedBrowserRadio)
{
selectedBrowserRadio = Request.Form["leftBrowser"];
selectedBrowserRadio = selectedBrowserRadio.Replace(" ", string.Empty);
var selectedBrowser = (Browser)Enum.Parse(typeof(Browser), selectedBrowserRadio, true);
var bmp= ScreenShotter.TakeScreenShot(selectedBrowser, url);
var converter = new ImageConverter();
var bmpArray = (byte[])converter.ConvertTo(bmp, typeof(byte[]));
return File(bmpArray,"image/png");
}
public ViewResult _DisplayImage()
{
return View("_DisplayImage");
}
My problem is that the image returned is displayed in the whole view not in the div area in which I specified. I need to render it in the left div area
thank you

Try changing
public ActionResult WebAppView()
{
return View();
}
into
public ActionResult WebAppView()
{
return PartialView();
}

#Html.Partial("_DisplayImage") should call directly to the partial view and not go through the controller.
Did you mean to use #Html.RenderAction() to call the Action method? and if so your action method is returning a view("_DisplayImage") result and not a PartialView("_DisplayImage") which it should be.

Related

Am I not properly performing update(goal)?

I am building an app in Vue that is tracking the sum of donations paid to my ExtraLife Team and tallies them up based on a user-submitted #tag in the message provided with the donation. Currently, I've been working on a Goal Editor view using what I've named the adminView component to display the full goals table and allow a user to edit the rows. The problem that I'm having is that for some reason when I attempt to update(goal) I'm getting a 400 (Bad Request) response. Obviously, I must have something malformed or missing in the data, I'm just not seeing what.
Here is my current #/components/AdminView.vue (Auth url and Key Removed)
<template>
<div id="adminView">
<h1>Goal Editor</h1>
<table style="border-collapse: collapse; width: 80%">
<thead>
<tr style="border: 1px solid #ddd">
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 3%;
"
>
ID
</th>
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 5%;
"
>
Tag
</th>
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 35%;
"
>
Description
</th>
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 10%;
"
>
Target Amount
</th>
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 10%;
"
>
Current Donations
</th>
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 4%;
"
>
Active
</th>
<th
style="
padding: 8px;
text-align: left;
border: 1px solid #ddd;
width: 6%;
"
></th>
</tr>
</thead>
<tbody>
<tr
v-for="(goal, index) in goals"
:key="goal.goal_id"
:style="[index % 2 == 0 ? 'background-color: #f2f2f2' : '']"
>
<td style="padding: 8px; text-align: left; border: 1px solid #ddd">
{{ goal.goal_id }}
</td>
<td style="padding: 8px; text-align: left; border: 1px solid #ddd">
<input
v-model="goal.tag"
v-if="goal.editing"
type="text"
style="border: none; outline: none; width: 100%"
/>
<span v-else>#{{ goal.tag }}</span>
</td>
<td style="padding: 8px; text-align: left; border: 1px solid #ddd">
<input
v-model="goal.goal_description"
v-if="goal.editing"
type="text"
style="border: none; outline: none; width: 100%"
/>
<span v-else>{{ goal.goal_description }}</span>
</td>
<td style="padding: 8px; text-align: left; border: 1px solid #ddd">
<input
v-model="goal.goal_target"
v-if="goal.editing"
type="number"
style="border: none; outline: none; width: 100%"
/>
<span v-else>${{ goal.goal_target }}</span>
</td>
<td style="padding: 8px; text-align: left; border: 1px solid #ddd">
<input
v-model="goal.goal_tally"
v-if="goal.editing"
type="number"
style="border: none; outline: none; width: 100%"
/>
<span v-else>${{ goal.goal_tally }}</span>
</td>
<td style="padding: 8px; text-align: left; border: 1px solid #ddd">
<input
v-model="goal.active"
v-if="goal.editing"
type="checkbox"
style="outline: none"
/>
<span v-else>{{ goal.active }}</span>
</td>
<td style="padding: 8px; text-align: center; border: 1px solid #ddd">
<button
v-if="goal.editing"
#click="saveGoal(goal)"
style="
outline: none;
border: none;
background-color: #4caf50;
color: white;
padding: 8px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
"
>
Save
</button>
<button
v-else
#click="editGoal(goal)"
style="
outline: none;
border: none;
background-color: #f2f2f2;
color: black;
padding: 8px 16px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
"
>
Edit
</button>
</td>
</tr>
</tbody>
</table>
</div>
</template>
<script>
import { createClient } from "#supabase/supabase-js"; // Import the Supabase client
export default {
name: "adminView",
data() {
return {
supabase: null,
session: null,
error: null,
goals: [],
};
},
async created() {
// Create the Supabase client object
this.supabase = createClient(
"MY DB URL IS HERE",
"MY DB SECRET KEY IS HERE"
);
// Fetch the current user's session
const { data, error } = await this.supabase.auth.getSession();
this.session = data;
this.error = error;
// Fetch the goals from the database
await this.fetchGoals();
},
methods: {
async fetchGoals() {
console.log("Fetching goals...");
const { data, error } = await this.supabase.from("goals").select("*");
console.log(data, error);
this.goals = data;
console.log("Goals fetched!");
console.log(this.goals);
},
editGoal(goal) {
goal.editing = true;
},
async saveGoal(goal) {
console.log(goal);
goal.editing = false;
await this.supabase.from("goals").update(goal);
},
},
};
</script>
<style>
#adminView {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
</style>
Thanks to a comment from #kissu I remembered to check the network tab and compared it to a manual request and discovered that I had an extra value in this.goal that was making it's way into the request. I fixed by deleting the extra value and then setting it back to false.
async saveGoal(goal) {
delete goal.editing;
console.log(goal);
await this.supabase
.from("goals")
.update(goal)
.eq("goal_id", goal.goal_id);
goal.editing = false;
},

How do I append a table row at the end on an element click in VueJS?

I am trying to have two rows available on the table, but the user may need more rows to enter more data part of a form that will be submitted. I am having a hard time making this work. Can someone help with this? I am trying to add a row when the user clicks on the little plus icon at the end of the last TR > TD.
<template>
<table id="myTable">
<tbody>
<tr v-for="(content1, content2, content3, content4, index) in tableRows">
<td scope="row" data-label="">{{content1}}</td>
<td data-label="Filename">{{content2}}</td>
<td data-label="Image Title">{{content3}}</td>
<td data-label="Caption">{{content4}}></td>
<td class="addrow" data-label="Add"><a class="add-link"><span #click="insert_Row()" class="plus-icon">+</span></a></td>
</tr>
</tbody>
</table>
</template>
<script>
export default {
data: {
tableRows: ['D2',"<input type='text'>", "<input type='text'>", "<input type='text'>"],
counter: 2
},
methods: {
insert_Row() {
this.counter++;
this.tableRows.push("D " +this.counter);
}
}
}
</script>
<style lang="scss">
td,
th {
padding: .4rem;
&.addrow {
border: 0 none;
width: 2.3rem;
padding: 1.7rem 0 0 0;
vertical-align: middle;
text-align: center;
}
}
td .plus-icon {
border:1px solid cornflowerblue;
background-color: cornflowerblue;
color: #fff;
text-align: center;
padding: 0 .7rem;
box-sizing: border-box;
border-radius: 50%;
transition: all ease-in-out .4s;
&:hover, &:focus {
border:1px solid #182241;
background-color: #182241;
}
}
</style>
I am trying to have two rows available on the table, but the user may need more rows to enter more data part of a form that will be submitted. I am having a hard time making this work. Can someone help with this? I am trying to add a row when the user clicks on the little plus icon at the end of the last TR > TD.* <template>
<table id="myTable">
<tbody>
<tr v-for="(content1, content2, content3, content4, index) in tableRows">
<td scope="row" data-label="">{{content1}}</td>
<td data-label="Filename">{{content2}}</td>
<td data-label="Image Title">{{content3}}</td>
<td data-label="Caption">{{content4}}></td>
<td class="addrow" data-label="Add">
<a class="add-link">
<span #click="insert_Row()" class="plus-icon">+</span>
</a>
</td>
</tr>
</tbody>
</table>
</template>
<script>
export default {
data: {
tableRows: ['D2', " < input type = 'text' > ", " < input type = 'text' > ", " < input type = 'text' > "], counter: 2 }, methods: { insert_Row() { this.counter++; this.tableRows.push("
D " +this.counter); } } }
</script>
<style lang="scss">
td,
th {
padding: .4rem;
&.addrow {
border: 0 none;
width: 2.3rem;
padding: 1.7rem 0 0 0;
vertical-align: middle;
text-align: center;
}
}
td .plus-icon {
border: 1px solid cornflowerblue;
background-color: cornflowerblue;
color: #fff;
text-align: center;
padding: 0 .7rem;
box-sizing: border-box;
border-radius: 50%;
transition: all ease-in-out .4s;
&:hover,
&:focus {
border: 1px solid #182241;
background-color: #182241;
}
}
</style> ``` Okay now, after a good response, I have edited the code. It now looks like this. ``` <template>
<table id="myTable">
<tbody>
<tr>
<td scope="row" data-label="">D1</td>
<td data-label="Filename">
<input type="text">
</td>
<td data-label="Image Title">
<input type="text">
</td>
<td data-label="Caption">
<input type="text">
</td>
<td class="addrow" data-label="Add"></td>
</tr>
<tr>
<td scope="row" data-label="">D2</td>
<td data-label="Filename">
<input type="text">
</td>
<td data-label="Image Title">
<input type="text">
</td>
<td data-label="Caption">
<input type="text">
</td>
<td class="addrow" data-label="Add"></td>
</tr>
<tr v-for="(item, index) in tableRows" :key="item.id">
<td scope="row" data-label="">D{{item.id}}</td>
<td data-label="Filename">
<input type="text" v-model="item.Filename">
</td>
<td data-label="Image Title">
<input type="text" v-model="item.ImageTitle">
</td>
<td data-label="Caption">
<input type="text" v-model="item.Caption">
</td>
<td class="addrow" data-label="Add">
<a class="add-link">
<span #click.stop="insert_Row" class="plus-icon">+</span>
</a>
</td>
</tr>
</tbody>
</table>
</template>
<script>
export default {
data() {
return {
tableRows: [{
"id": 3,
"Filename": "",
"ImageTitle": "",
"Caption": ""
}]
}
},
methods: {
insert_Row() {
this.tableRows.push({
"id": this.tableRows.length + 3,
"Filename": "",
"ImageTitle": "",
"Caption": ""
})
}
}
}
</script>
<style lang="scss">
td,
th {
padding: .4rem;
&.addrow {
border: 0 none;
width: 2.3rem;
padding: 1.7rem 0 0 0;
vertical-align: middle;
text-align: center;
}
}
td .plus-icon {
border: 1px solid cornflowerblue;
background-color: cornflowerblue;
color: #fff;
text-align: center;
padding: 0 .7rem;
box-sizing: border-box;
border-radius: 50%;
transition: all ease-in-out .4s;
&:hover,
&:focus {
border: 1px solid #182241;
background-color: #182241;
}
}
</style>
I want to only have the icon plus on the last row cell. I wish to hide or remove the others, but also, I edited the code to start with 3 rows instead of one.
Your data should be reactive.
You should bind your data to the html inputs.
You need to rethink your code a lot. Here is an example of how you could get started: Vue SFC Playground

Not able to select item from dropdown using selenium webdriver for vba

I have been trying to automatically select the first option from a dropdown in a webpage by using selenium webdriver for vba but unable to do so. I have tried using different methods like find element by ID, find element by xpath etc. but getting NoSuchElementError.
Here is the code which I have tried.
bot.FindElementById("ReportViewerControl_ctl04").Click
here is the HTML code for the element.
Any help would be greatly appreciated.
This is the whole HTML code of the web page.
<body style="margin: 0px; overflow: auto;">
<form id="ReportViewerForm" style="width: 100%; height: 100%;" action="./ReportViewer.aspx?%2fMPM%2fMPM_ProjectServices_Schedule" method="post">
<div class="aspNetHidden">
<input name="__EVENTTARGET" id="__EVENTTARGET" type="hidden" value="">
<input name="__EVENTARGUMENT" id="__EVENTARGUMENT" type="hidden" value="">
<input name="__VIEWSTATE" id="__VIEWSTATE" type="hidden" value="/wEPDwULLTE0NjY0NTA2NjMPZBYGZg8WAh4EVGV4dAUQPCFET0NUWVBFIGh0bWw+CmQCAg8WAh4EbGFuZwUFZW4tVVMWAgIBDxYCHwAFOAoJPE1FVEEgSFRUUC1FUVVJVj0iWC1VQS1Db21wYXRpYmxlIiBDT05URU5UPSJJRT1lZGdlIj4KZAIED2QWBAIED2QWBAIBDxYCHgVWYWx1ZWRkAgMPZBYCZg9kFgJmDxYCHwJkZAIFDxQrAAUPFgYeEFYxU3R5bGVTaGVldE5hbWVkHg5SZW5kZXJpbmdTdGF0ZQspkQFNaWNyb3NvZnQuUmVwb3J0aW5nLldlYkZvcm1zLlJlcG9ydFJlbmRlcmluZ1N0YXRlLCBSZXBvcnRpbmdTZXJ2aWNlc1dlYlNlcnZlciwgVmVyc2lvbj0xMy4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj04OTg0NWRjZDgwODBjYzkxAB4MU2Nyb2xsVGFyZ2V0ZGQoKVhTeXN0ZW0uR3VpZCwgbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5JGNlMjI3NTgzLWM5ODMtNDc0YS05NzNhLThhMmE4YzMzZWI4YQIBFCsAARQrAAQCARQrAAIFGGFvdWJtdXU1cXJ0eml5NTV3MDN4aXc0NQIBZGQyoBQAAQAAAP////8BAAAAAAAAAAwCAAAAXlJlcG9ydGluZ1NlcnZpY2VzV2ViU2VydmVyLCBWZXJzaW9uPT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m9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDAwBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDAyBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDAzBTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA0BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA1BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA2BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA3BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA4BTFSZXBvcnRWaWV3ZXJDb250cm9sJGN0bDA0JGN0bDA1JGRpdkRyb3BEb3duJGN0bDA5BSNSZXBvcnRWaWV3ZXJDb250cm9sJFRvZ2dsZVBhcmFtJGltZwUdUmVwb3J0Vmlld2VyQ29udHJvbCRjdGwwNyRpbWeh4k6oP2v2RyD7JkBegNWlkKc4gQzp2ZK9JtMLxgu//g==">
</div>
<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['ReportViewerForm'];
if (!theForm) {
theForm = document.ReportViewerForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</script>
<script src="/ReportServer/WebResource.axd?d=9xs5IOIfHw061TI0iHfRtCwcwm-Hj_q-6nrNp49wBW4ITTDIgspL_7LVbElrrTLYqCLVjoZNUhMNPIuGvaFRYw4C2NbxxS79dLaHu03gifA1&t=637100682046795651" type="text/javascript"></script>
<script src="/ReportServer/ScriptResource.axd?d=rk4cQgE67-CFfPE2bk9TbF_e_pYPZ5Fy_vkGwRwoX5kyz2YOoqnm25wmjRq4HmptTWVP1ULqYBrE4HHK-M3T7oBdrEWrJmxRhtlT9GbkJ79fFOP6HC8nzRVpzGlPfqlt_M1axvx-GXQ4M61ubN1d8G-JHeYRmdfdWkz6GkwbsSs1&t=ffffffffecf19baa" type="text/javascript"></script>
<script src="/ReportServer/ScriptResource.axd?d=jke1BTXXkzpx8QyDNk5MBiwVYnFwjyMgzINrp_oXCpsBkko99HnDr_rzrNzvHzyAK0PVFrKABrFWK2A1cbJGAJbwkSwrXJvC58YVxf1fRHELz28rRMUg7_2CTjGPKJGz9CX-d_sSPpCNu_L1MCfcx0n5LMLmxXZvpfRgYnHZscD5sc4_hs3mrssMm0HwH86i0&t=ffffffffecf19baa" type="text/javascript"></script>
<script src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Scripts.BrowserNavigationCorrector.js" type="text/javascript"></script>
<script src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=ViewerScript" type="text/javascript"></script>
<script src="/ReportServer/ScriptResource.axd?d=Fu_zv7h1Rznnc_ZLFNjT_Rl-wO7fB-KT_fBurCijvyrOMaFdirVDY9f7YXWFS9ztJmFsSywt6hVjNzhGPBxcy8ngfF6wmT3RlOVFYhrfgLCjbMZghFZSluNhGZuZMv2RUdvGMP0YFyGxyUTl8OPevvG_yMfV4QGjvLKS3jVKjiQ1&t=ffffffffecf19baa" type="text/javascript"></script>
<div class="aspNetHidden">
<input name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" type="hidden" value="177045DE">
</div>
<script type="text/javascript">
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('AjaxScriptManager', 'ReportViewerForm', ['tNavigationCorrector$ctl00','NavigationCorrector_ctl00','fReportViewerControl$ReportViewer','','fReportViewerControl$DocMap','','fReportViewerControl$ctl09$ReportArea',''], ['NavigationCorrector','NavigationCorrector'], ['ReportViewerControl$ctl09$ReportControl$ctl00',''], 0, '');
//]]>
</script>
<table width="100%" height="100%" cellspacing="0" cellpadding="0"><tbody><tr height="100%"><td width="100%">
<span><span id="ctl01_ctl00" style="display: none;"></span><script>
$addHandler(window, 'beforeunload', function() {Sys.WebForms.PageRequestManager.getInstance().abortPostBack();});
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function(sender, args) {
if (args.get_error() !== null) {
var label = $get('ctl01_ctl00');
label.style.display = '';
label.innerText = args.get_error().message;
label.textContent = label.innerText;
}
});
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(function(sender, args) {$get('ctl01_ctl00').style.display = 'none';});
</script></span><div id="NavigationCorrector" style="display: none;">
<input name="NavigationCorrector$ScrollPosition" id="NavigationCorrector_ScrollPosition" type="hidden"><input name="NavigationCorrector$ViewState" id="NavigationCorrector_ViewState" type="hidden"><input name="NavigationCorrector$PageState" id="NavigationCorrector_PageState" type="hidden" value="Loaded"><div id="NavigationCorrector_ctl00">
<input name="NavigationCorrector$NewViewState" id="NavigationCorrector_NewViewState" type="hidden">
</div>
</div><noscript>
&nbsp;Browser settings prevent scripts from running on this report. To view this report without scripts, click&nbsp;<a href="/reportserver?%2fMPM%2fMPM_ProjectServices_Schedule&amp;rs:Command=Render&amp;rs:Format=HTML5&amp;rc:LinkTarget=_top&amp;rc:Javascript=false&amp;rc:Toolbar=false">here</a>
</noscript><div id="ReportViewerControl_ReportViewer" style="width: 100%; height: 100%;">
<div id="ReportViewerControl" style="width: 100%; height: 100%;" onclick="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();" onactivate="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();">
<div id="ReportViewerControl_HttpHandlerMissingErrorMessage" style="padding: 10px; border: 2px solid red; overflow: auto; font-size: 0.85em; display: none;">
<h2>
Report Viewer Configuration Error
</h2><p>The Report Viewer Web Control HTTP Handler has not been registered in the application's web.config file. Add <add verb="*" path="Reserved.ReportViewerWebControl.axd" type = "Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.web/httpHandlers section of the web.config file, or add <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, ReportingServicesWebServer, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> to the system.webServer/handlers section for Internet Information Services 7 or later.</p>
</div><span id="ReportViewerControl_ctl03"><input name="ReportViewerControl$ctl03$ctl00" id="ReportViewerControl_ctl03_ctl00" type="hidden"><input name="ReportViewerControl$ctl03$ctl01" id="ReportViewerControl_ctl03_ctl01" type="hidden"></span><input name="ReportViewerControl$ctl10" id="ReportViewerControl_ctl10" type="hidden"><input name="ReportViewerControl$ctl11" id="ReportViewerControl_ctl11" type="hidden" value="standards"><div id="ReportViewerControl_AsyncWait" style="display: none; position: absolute; z-index: 1000; opacity: 0.7; background-color: white;">
</div><div class="WaitControlBackground" id="ReportViewerControl_AsyncWait_Wait" style="display: none; position: absolute; z-index: 1001;">
<table height="100%">
<tbody><tr>
<td width="32" height="32"><img style="width: 32px; height: 32px;" alt="Loading..." src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.SpinningWheel.gif"></td><td class="WaitInfoCell"><span class="WaitText">Loading...</span><div class="CancelLinkDiv">
<a class="CancelLinkText" href="javascript:$get('ReportViewerControl_AsyncWait').control._cancelCurrentPostback();">Cancel</a>
</div></td>
</tr>
</tbody></table>
</div><input name="ReportViewerControl$AsyncWait$HiddenCancelField" id="ReportViewerControl_AsyncWait_HiddenCancelField" type="hidden" value="False"><table id="ReportViewerControl_fixedTable" style="width: 100%; height: 100%; table-layout: fixed;" cellspacing="0" cellpadding="0">
<tbody><tr class="MenuBarBkGnd">
<td style="width: 25%; display: none;"></td><td style="width: 6px; display: none;"></td><td style="width: 100%;"></td>
</tr><tr id="ParametersRowReportViewerControl">
<td colspan="3"><div id="ReportViewerControl_ctl04" style="width: 100%; -ms-overflow-x: auto; -ms-overflow-y: hidden;">
<div onclick="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();" onactivate="if ($get('ReportViewerControl_ctl04') != null && $get('ReportViewerControl_ctl04').control != null) $get('ReportViewerControl_ctl04').control.HideActiveDropDown();">
<table width="100%" class="ParametersFrame ParamsGrid MenuBarBkGnd" id="ParameterTable_ReportViewerControl_ctl04" cellspacing="0" cellpadding="0" name="ParameterTable_ReportViewerControl_ctl04">
<tbody><tr>
<td width="100%" height="100%"><table id="ParametersGridReportViewerControl_ctl04">
<tbody><tr isparameterrow="true">
<td class="ParamLabelCell"><label for="ReportViewerControl_ctl04_ctl03_txtValue"><span>BU</span></label></td><td class="ParamEntryCell" style="padding-right: 0px;"><div id="ReportViewerControl_ctl04_ctl03" data-parametername="BU">
<div style="white-space: nowrap;" onactivate="event.cancelBubble=true;">
<input name="ReportViewerControl$ctl04$ctl03$txtValue" class="null" id="ReportViewerControl_ctl04_ctl03_txtValue" type="text" size="28" readonly="readonly"><input name="ReportViewerControl$ctl04$ctl03$ddDropDownButton" title="Select a value" id="ReportViewerControl_ctl04_ctl03_ddDropDownButton" style="margin-top: 1px; vertical-align: top; cursor: pointer;" type="image" alt="Select a value" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.MultiValueSelect.gif">
</div>
</div></td><td class="InterParamPadding"></td><td class="ParamLabelCell"><label for="ReportViewerControl_ctl04_ctl05_txtValue"><span>Phase</span></label></td><td class="ParamEntryCell" style="padding-right: 0px;"><div id="ReportViewerControl_ctl04_ctl05" data-parametername="Phase">
<div style="white-space: nowrap;" onactivate="event.cancelBubble=true;">
<input name="ReportViewerControl$ctl04$ctl05$txtValue" class="null" id="ReportViewerControl_ctl04_ctl05_txtValue" type="text" size="28" readonly="readonly"><input name="ReportViewerControl$ctl04$ctl05$ddDropDownButton" title="Select a value" id="ReportViewerControl_ctl04_ctl05_ddDropDownButton" style="margin-top: 1px; vertical-align: top; cursor: pointer;" type="image" alt="Select a value" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.MultiValueSelect.gif">
</div>
</div></td><td class="InterParamPadding"></td>
</tr>
</tbody></table></td><td width="6"></td><td class="SubmitButtonCell"><table>
<tbody><tr>
<td><input name="ReportViewerControl$ctl04$ctl00" id="ReportViewerControl_ctl04_ctl00" type="submit" value="View Report"></td>
</tr>
</tbody></table></td>
</tr>
</tbody></table><input disabled="disabled" style="display: none; visibility: hidden;" type="text">
</div>
</div><iframe name="ReportViewerControl_ctl04_ctl03_ctl01" title="BU place holder" id="ReportViewerControl_ctl04_ctl03_ctl01" src="javascript:'';" frameborder="0" longdesc="BU place holder" style="display: none; position: absolute; z-index: 10;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;"></iframe><div id="ReportViewerControl_ctl04_ctl03_divDropDown" style="border: 1px solid darkgray; height: 150px; overflow: auto; display: none; position: absolute; z-index: 11; background-color: window;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;">
<span><input name="ReportViewerControl$ctl04$ctl03$divDropDown$ctl01$HiddenIndices" id="ReportViewerControl_ctl04_ctl03_divDropDown_ctl01_HiddenIndices" type="hidden" value=""></span>
</div><iframe name="ReportViewerControl_ctl04_ctl05_ctl01" title="Phase place holder" id="ReportViewerControl_ctl04_ctl05_ctl01" src="javascript:'';" frameborder="0" longdesc="Phase place holder" style="display: none; position: absolute; z-index: 10;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;"></iframe><div id="ReportViewerControl_ctl04_ctl05_divDropDown" style="border: 1px solid darkgray; height: 150px; overflow: auto; display: none; position: absolute; z-index: 11; background-color: window;" onclick="event.cancelBubble=true;" onactivate="event.cancelBubble=true;">
<span><input name="ReportViewerControl$ctl04$ctl05$divDropDown$ctl01$HiddenIndices" id="ReportViewerControl_ctl04_ctl05_divDropDown_ctl01_HiddenIndices" type="hidden" value=""></span>
</div></td>
</tr><tr style="height: 6px; font-size: 2pt;">
<td class="SplitterNormal" style="margin: 0px; padding: 0px; text-align: center; cursor: default;" colspan="3"><div id="ReportViewerControl_ToggleParam">
<input name="ReportViewerControl$ToggleParam$img" title="Hide Parameters" align="middle" id="ReportViewerControl_ToggleParam_img" aria-live="polite" style="cursor: pointer;" onclick="void(0);" type="image" alt="Hide Parameters" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.SplitterHorizCollapse.png"><input name="ReportViewerControl$ToggleParam$store" id="ReportViewerControl_ToggleParam_store" type="hidden"><input name="ReportViewerControl$ToggleParam$collapse" id="ReportViewerControl_ToggleParam_collapse" type="hidden" value="false">
</div></td>
</tr><tr style="display: none;">
</tr><tr>
<td style="width: 25%; height: 100%; vertical-align: top; display: none;"><div style="width: 100%; height: 100%;">
<div id="ReportViewerControl_DocMap" style="width: 100%; height: 100%;">
<div id="ReportViewerControl_ctl08" style="display: none;">
<input name="ReportViewerControl$ctl08$ClientClickedId" id="ReportViewerControl_ctl08_ClientClickedId" type="hidden">
</div>
</div>
</div></td><td class="SplitterNormal" style="margin: 0px; padding: 0px; width: 4px; height: 100%; vertical-align: middle; display: none;"><div id="ReportViewerControl_ctl07">
<input name="ReportViewerControl$ctl07$img" title="Hide Document Map" align="top" id="ReportViewerControl_ctl07_img" aria-live="polite" style="cursor: pointer;" onclick="void(0);" type="image" alt="Hide Document Map" src="/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=Resource&Version=13.0.1601.5&Name=Microsoft.Reporting.WebForms.Icons.SplitterVertCollapse.png"><input name="ReportViewerControl$ctl07$store" id="ReportViewerControl_ctl07_store" type="hidden"><input name="ReportViewerControl$ctl07$collapse" id="ReportViewerControl_ctl07_collapse" type="hidden" value="false">
</div></td><td style="height: 100%; vertical-align: top;"><div id="ReportViewerControl_ctl09" style="width: 100%; height: 247.27px; overflow: auto; position: relative;">
<div id="VisibleReportContentReportViewerControl_ctl09" role="main" style="display: none;"></div><div id="ReportViewerControl_ctl09_ReportArea">
<div id="ReportViewerControl_ctl09_VisibilityState" fornonreportcontentarea="false" newcontenttype="ReportingServices.WebFormsClient.ReportAreaContent.None">
<input name="ReportViewerControl$ctl09$VisibilityState$ctl00" type="hidden" value="None">
</div><input name="ReportViewerControl$ctl09$ScrollPosition" id="ReportViewerControl_ctl09_ScrollPosition" type="hidden"><span id="ReportViewerControl_ctl09_Reserved_AsyncLoadTarget"></span><div id="ReportViewerControl_ctl09_ReportControl" style="display: none;">
<span></span><input name="ReportViewerControl$ctl09$ReportControl$ctl02" type="hidden"><input name="ReportViewerControl$ctl09$ReportControl$ctl03" type="hidden"><input name="ReportViewerControl$ctl09$ReportControl$ctl04" id="ReportViewerControl_ctl09_ReportControl_ctl04" type="hidden" value="100">
</div><div id="ReportViewerControl_ctl09_NonReportContent" style="width: 100%; height: 100%; display: none;">
</div>
</div>
</div></td>
</tr>
</tbody></table>
</div>
</div>
</td></tr></tbody></table>

cant disappear placeholder after focus on it

Here I am using the angular material form for login form using Angular5. when the applications starts, the login form placeholder couldn't be over-written. But once one I logged in and logged out, then only the input fields would be over written. Screenshot
<form [formGroup]="loginform" class="login-form">
<mat-icon style="font-size: 30px ">account_circle</mat-icon>
<mat-form-field class="example-full-width">
<input matInput placeholder="Username" formControlName="userName">
</mat-form-field>
<br>
<mat-icon style="font-size: 30px">lock_open</mat-icon>
<mat-form-field>
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'" formControlName="password">
<mat-icon matSuffix (click)="hide = !hide">{{!hide ? 'visibility' : 'visibility_off' }}</mat-icon>
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!loginform.valid" (click)="clicklogin();loginform.reset()">Login</button>
<button mat-raised-button color="primary">cancel</button>
</form>
CSS File
.login-form{
top: 35%;
border: 1px;
border-style: double;
position: absolute;
width: 30%;
border-radius: 5px;
padding: 20px;
left: 30%;
}
mat-form-field{
width: 80%;
}
button{
text-align: center;
margin-left :17%;
}
mat-icon{
float: left;
line-height: 2;
margin-right: 10px;
}
You can use mat-placeholder and handle visibility easily by CSS
styles:
.placeholder.hide-ph {
display: none;
}
component.ts:
<input
...
[value]="value"
floatPlaceholder="never"
(focus)="hidePlaceholder = true" // <== you need this
/>
<mat-icon class="caret" matSuffix>arrow_drop_down</mat-icon>
<mat-placeholder
class="placeholder"
[class.hide-ph]="!!value || hidePlaceholder" // <== and this to hide placeholder by css
>
{{ placeholder }}
</mat-placeholder>
Its working fine for me.
.login-form{
top: 35%;
border: 1px;
border-style: double;
position: absolute;
width: 30%;
border-radius: 5px;
padding: 20px;
left: 30%;
}
mat-form-field{
width: 80%;
}
button{
text-align: center;
margin-left :17%;
}
mat-icon{
float: left;
line-height: 2;
margin-right: 10px;
}
<form [formGroup]="loginform" class="login-form">
<mat-icon style="font-size: 30px ">account_circle</mat-icon>
<mat-form-field class="example-full-width">
<input matInput placeholder="Username" formControlName="userName">
</mat-form-field>
<br>
<mat-icon style="font-size: 30px">lock_open</mat-icon>
<mat-form-field>
<input matInput placeholder="Enter your password" [type]="hide ? 'password' : 'text'" formControlName="password">
<mat-icon matSuffix (click)="hide = !hide"></mat-icon>
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!loginform.valid" (click)="clicklogin();loginform.reset()">Login</button>
<button mat-raised-button color="primary">cancel</button>
</form>

Custom (width and height) to print Product Labels on Odoo - QWEB

Right now the system is printing the Product Labels and work fine but in wrong dimensions.
I need set width to 7cm and height to 4cm on QWEB report.
Where I can change the dimensions to print QWEB report?
I can't change the format to the print preferences because in a sheet can be many Products Labels.
This is my QWEB:
<?xml version="1.0"?>
<t t-name="product.report_productlabel">
<t t-call="report.html_container">
<div class="page">
<style>
</style>
<t t-foreach="docs" t-as="template">
<t t-foreach="template.product_variant_ids" t-as="product">
<div class="col-xs-6" style="padding:0;">
<table style="border-spacing:0;margin-bottom:0;height: 110px;border: 2px solid black;" class="table">
<thead>
<tr style="width: 3in;">
<td style="width: 2.63in;text-align: center;background-color: #fff;" colspan="2" class="col-xs-8 danger">
<strong style="text-transform: uppercase;">
<t t-esc="product.name"/>
</strong>
</td>
</tr>
</thead>
<tbody>
<tr style="width: 1in;">
<td style="text-align: center; border-top: 0px solid #fff; padding: 0px 5px 0px 5px;" class="col-xs-5">
<h4 style="border: 4px solid #ff4040;border-radius: 9px;background-color: #ffff00;padding: 10px 12px 10px 12px;font-size: 26px;margin-top: 0px;margin-bottom: 0px;">
<strong t-field="product.list_price" />
<strong>
<t t-esc="product.company_id.currency_id.symbol"/>
</strong>
</h4>
</td>
<td style="text-align: center;border-top: 0px solid #fff;padding: 0px 5px 0px 5px;" class="col-xs-7">
<img class="img-responsive"
t-att-src="'data:image/png;base64,%s' % res_company.logo"
style="background-color: #fff;margin-left: auto;margin-right: auto;width: auto;height: 16px;margin-bottom: 8px;"/>
<img class="img-responsive" t-if="product.barcode"
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 650, 200)"
style="height: 20px;width: 100%;"/>
<span style="">
<t t-esc="product.barcode"/>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</div>
This the solution for the width of the table using the DPI of 90;
<table style="border-spacing:0;margin-bottom:0;height: 187px; width: 319px; border: 2px solid black;" class="table">
This is the QWEB template with the dimensions you need and I also scale the fonts and padding of the table elements to match the new width and height:
<?xml version="1.0"?>
<t t-name="product.report_productlabel">
<t t-call="report.html_container">
<div class="page">
<style>
</style>
<t t-foreach="docs" t-as="template">
<t t-foreach="template.product_variant_ids" t-as="product">
<div class="col-xs-6" style="padding:0;">
<table style="border-spacing:0;margin-bottom:0;height: 187px; width: 319px; border: 2px solid black;"
class="table">
<thead>
<tr style="width: 3in;">
<td style="width: 2.63in; font-size: 19px; text-align: left; background-color: #fff; margin-top: 10px;"
colspan="2"
class="col-xs-8 danger">
<strong style="text-transform: uppercase;">
<t t-esc="product.name"/>
</strong>
</td>
</tr>
</thead>
<tbody>
<tr style="width: 1in;">
<td width="50%"
style="text-align: center; border-top: 0px solid #fff; padding: 5px; position: relative;">
<div style="position:absolute; bottom: 20px; left: 0; padding-left: 5px; width: 100%">
<h4 style="border: 4px solid #ff4040; border-radius: 9px; background-color: #ffff00; padding: 10px 6px; font-size: 21px; margin: 0px ">
<strong t-field="product.list_price"/>
<strong>
<t t-esc="product.company_id.currency_id.symbol"/>
</strong>
</h4>
</div>
</td>
<td width="50%"
style="text-align: center;border-top: 0px solid #fff;padding: 5px; position: relative;">
<div style="position:absolute; bottom: 20px; padding-right: 5px;">
<img class="img-responsive"
t-att-src="'data:image/png;base64,%s' % res_company.logo"
style="background-color: #fff; margin-left: auto; margin-right: auto; width: auto; height: 35px; margin-bottom: 5px;"/>
<img class="img-responsive" t-if="product.barcode"
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('EAN13', product.barcode, 650, 200)"
style="height: 20px; width: 100%;"/>
<span style="font-size: 14px">
<t t-esc="product.barcode"/>
</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</div>
</t>
You might look at the report.paperformat model, which defines the format for the paper size. You find the default values in addons\report\views\report_paperformat_views.xml.